Throws IO Exception Error..
Hi, basically I have a piece of code as follows:
import java.io.*;
public class EmpInFile
private DataInputStream input;
public EmpInFile()
public boolean readRecord(Employee pers)
boolean end = false;
try {
pers.setId(input.readInt());
pers.setFirst(input.readUTF());
pers.setLast(input.readUTF());
pers.setSalary(input.readDouble());
pers.setTaxCreds(input.readDouble());
pers.setTaxCode(input.readChar());
pers.setDeptCode(input.readChar());
pers.setYtdGross(input.readDouble());
pers.setytdTax(input.readDouble());
catch ( EOFException eof )
end = true;
catch ( IOException e )
System.err.println( "Error during read from file\n" +
e.toString() );
System.exit( 1 );
return end;
public void openFile(String filename) throws java.io.IOException
DataInputStream input = new DataInputStream(new FileInputStream(filename));
public void closeFile() throws java.io.IOException
input.close();
} This compiles perfectly but when I try to compile the driver program which uses this class I get the following error:
unreported exception in java.io.IOException; must be caught or declared to be thrown
and the error points to the method
public void closeFile() throws java.io.IOException
input.close();
}but clearly I have declared an exception could be thrown so why am I still getting this error? I'm a complete java novice so apologies if this is a stupid mistake to make!
I'll post the driver program up aswell if it'll help at all, I'd be very grateful for any help!
Thanks!
So it was the call to the method that failed to compile. I suspected that, but why didn't you really just post the actual line of code that caused the error? Do you realize you only posted the code of the callee not the caller and this had nothing to do with the error?
As I said, it is important to clearly communicate the problem(s) and not make people guess.
Try harder next time.
Similar Messages
-
Throw exception error everywhere in JSP!
I've wrote a JSP to access SQL Server database in J2SE sucessfully, but when
I try that on a different server using Java 1.1 I get the same type of
errors complaining about
"the method " blah blah blah" can throw the checked exception
"java/lang/ClassNotFoundException", but its invocation is neither enclosed
in a try statement that can catch that exception nor in the body of a method
or constructor that "throws" that exception."
this is another sample of my errors
31. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
<------------------------------------------->
*** Error: The method "java.lang.Class forName(java.lang.String $1);" can
throw the checked exception "java/lang/ClassNotFoundException", but its
invocation is neither enclosed in a try statement that can catch that
exception nor in the body of a method or constructor that "throws" that
exception.
33. Connection con=DriverManager.getConnection(url, "ema", "ema");
<-------------------------------------------->
*** Error: The method "java.sql.Connection getConnection(java.lang.String
$1, java.lang.String $2, java.lang.String $3);" can throw the checked
exception "java/sql/SQLException", but its invocation is neither enclosed in
a try statement that can catch that exception nor in the body of a method or
constructor that "throws" that exception.
Am I missing some libraries or calling the method incorrectly because of the
version of Java was older?
Here I also attached my code
<%
//connection and query
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:DB";
Connection con=DriverManager.getConnection(url, "sa", "password");
PreparedStatement query = con.prepareStatement("select Quarter, Month,
WeekDay, statusCode, Responded, CNT from REQUEST",
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = query.executeQuery();
rs.last();
int numrows = rs.getRow();
rs.beforeFirst();
%>
Thanks in advanced
KuI've wrote a JSP to access SQL Server database in J2SE sucessfully, but when
I try that on a different server using Java 1.1 I get the same type of
errors complaining about
"the method " blah blah blah" can throw the checked exception
"java/lang/ClassNotFoundException", but its invocation is neither enclosed
in a try statement that can catch that exception nor in the body of a method
or constructor that "throws" that exception."
this is another sample of my errors
31. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
<------------------------------------------->
*** Error: The method "java.lang.Class forName(java.lang.String $1);" can
throw the checked exception "java/lang/ClassNotFoundException", but its
invocation is neither enclosed in a try statement that can catch that
exception nor in the body of a method or constructor that "throws" that
exception.
33. Connection con=DriverManager.getConnection(url, "ema", "ema");
<-------------------------------------------->
*** Error: The method "java.sql.Connection getConnection(java.lang.String
$1, java.lang.String $2, java.lang.String $3);" can throw the checked
exception "java/sql/SQLException", but its invocation is neither enclosed in
a try statement that can catch that exception nor in the body of a method or
constructor that "throws" that exception.
Am I missing some libraries or calling the method incorrectly because of the
version of Java was older?
Here I also attached my code
<%
//connection and query
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:DB";
Connection con=DriverManager.getConnection(url, "sa", "password");
PreparedStatement query = con.prepareStatement("select Quarter, Month,
WeekDay, statusCode, Responded, CNT from REQUEST",
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = query.executeQuery();
rs.last();
int numrows = rs.getRow();
rs.beforeFirst();
%>
Thanks in advanced
Ku -
Throwing Custom Exception in SXMB_MONI( Error Node)
Hello all,
The requirement is to Throw an Custom Error Exception in the SXMB_MONI, which we are able to do and generate the custom error message to stop the message in moni . I have created the UDF to call API's Classes such as BaseRuntimeException or RuntimeException.
Above API's -Able to populate the Custom Message in the TRACE Node of the Request Message mapping Step.
Not Able to Populate the error Message in the ERROR Node of the Request Message mapping Step,so I want to know is that any API's can be used to populate the custom message in error Node or Can i raise the OSS notes ? .
Any OSS notes helps me to do that?
Thanks,
KamalHi,
There is no API to provide this functionality. The reason is the XI message processing is through pipeline as you know. And this is nothing but SAP specific services. So you can not alter them as they are. For the request that you are asking, you will have to edit the pipeline step that populates the SAP:ERROR node. For this, we need to identify which service does this and then if it is possible to write a user exit, etc...So in this case, I would suggest you go with raising an OSS note.
However, can you please tell us why is this required? I can understand to send a message/mail if you get an error or something like that. But I am not able to figure out in what scenarios would you require this kind of error display.
Thanks and Regards,
Sarath. -
ADT command line errors (java throws an exception)
I'll spare you the frustration of these past 24 hours, needless to say I've read most (if not all) of the threads related to compiling a swf into a ipa. As it is, I'm very close and can't seem to get it to compile.
On a Mac: the CMD line I am running is this:
./adt -package -target ipa-test -storetype pkcs12 -keystore Certificates.p12 -storepass *P*A*S*S*W*O*R*D* -provisioning-profile Team_Provisioning_Profile_.mobileprovision APPNAME.ipa APPNAME-app.xml -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/ APPNAME.swf -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/AppIconsForPublish/ . -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/ Default.png
The APPNAME-app.xml file is as follows:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<application xmlns="http://ns.adobe.com/air/application/2.0">
<id>APPNAME</id>
<version>1.0</version>
<filename>APPNAME</filename>
<description>test build of the app</description>
<!-- To localize the description, use the following format for the description element.
<description>
<text xml:lang="en">English App description goes here</text>
<text xml:lang="fr">French App description goes here</text>
<text xml:lang="ja">Japanese App description goes here</text>
</description>
-->
<name>APPNAME</name>
<!-- To localize the name, use the following format for the name element.
<name>
<text xml:lang="en">English App name goes here</text>
<text xml:lang="fr">French App name goes here</text>
<text xml:lang="ja">Japanese App name goes here</text>
</name>
-->
<copyright></copyright>
<initialWindow>
<content>APPNAME.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>false</fullScreen>
<autoOrients>false</autoOrients>
<aspectRatio>portrait</aspectRatio>
<renderMode>auto</renderMode>
</initialWindow>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<icon>
<image512x512>AIRApp_512.png</image512x512>
<image48x48>AIRApp_48.png</image48x48>
<image57x57>AIRApp_57.png</image57x57>
<image72x72>AIRApp_72.png</image72x72>
</icon>
<iPhone><InfoAdditions><![CDATA[<key>UIDeviceFamily</key><array><string>1</string></array> ]]></InfoAdditions></iPhone></application>
The java OS error it is throwing (on my Mac OS X 10.7.6):
Exception in thread "main" java.lang.Error: Unable to find named traits: spark.components::Application
at adobe.abc.Domain.resolveTypeName(Domain.java:225)
at adobe.abc.Domain.resolveTypeName(Domain.java:142)
at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:272)
at adobe.abc.GlobalOptimizer$InputAbc.readInstance(GlobalOptimizer.java:936)
at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:390)
at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:278)
at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:194)
at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcode(AOTCompiler.java:350)
at com.adobe.air.ipa.AOTCompiler.GenerateMacBinary(AOTCompiler.java:680)
at com.adobe.air.ipa.IPAOutputStream.compileRootSwf(IPAOutputStream.java:216)
at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:411)
at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:87)
at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:163)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:504)
at com.adobe.air.ADT.run(ADT.java:361)
at com.adobe.air.ADT.main(ADT.java:411)
The version of Java that I'm running is:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
For the life of me, I can't figure out what / why this is throwing an exception. Having battled through the missing icon 303 errors and getting to what I think is the final issue, please... can anyone debug why the SWF is not compiling?Tried a variation of the above CMD line:
./adt -package -target ipa-test -storetype pkcs12 -keystore Certificates.p12 -storepass PASSWORD -provisioning-profile Team_Provisioning_Profile_.mobileprovision APPNAME.ipa APPNAME-app.xml -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/ APPNAME.swf Default.png AppIconsForPublish
Still threw an error:
Exception in thread "main" java.lang.Error: Unable to find named traits: spark.components::Application
at adobe.abc.Domain.resolveTypeName(Domain.java:225)
at adobe.abc.Domain.resolveTypeName(Domain.java:142)
at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:272)
at adobe.abc.GlobalOptimizer$InputAbc.readInstance(GlobalOptimizer.java:936)
at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:390)
at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:278)
at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:194)
at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcode(AOTCompiler.java:350)
at com.adobe.air.ipa.AOTCompiler.GenerateMacBinary(AOTCompiler.java:680)
at com.adobe.air.ipa.IPAOutputStream.compileRootSwf(IPAOutputStream.java:216)
at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:411)
at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:87)
at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:163)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:504)
at com.adobe.air.ADT.run(ADT.java:361)
at com.adobe.air.ADT.main(ADT.java:411)
Different, but the same... no success -
How to throw an exception that is not treated as error
Hi,
I have a repository manager displayed as /root/myrepository. Now when someone who's not authorized clicked it, I wish an error message will display on top in red, but not throw an exception as System Error.
Now my implementation is to throw an ResourceException in getChildren() of the node. But when the user clicked on /root/repository, a System Error screen appeared, but what I want is just an error message.
Any help is much appreciated~
I don't know how to attach the screenshots. My MSN is [email protected]
Thanks,
RayIf you want to disallow getChildren altogether, throw an AccessDeniedException. If you want to hide specific children, just don't put them into the result list.
Best regards, Julian -
i am using vista sp1, recently while opening Firefox or any link within it a dialogue box appear " [java script application] An error occured throwing an exception" . however both cancelling or accepting opens the link or firefox but its nagging plz help
== This happened ==
Every time Firefox opened
== few days agoThe code is not working because you made a mistake somewhere, duh! So figure out what (hint: firefox javascript console, it's your friend) and fix it!
And next time when you post code: use the [ code ] tags to pretty format your code, as it is now it's unreadable.
http://forum.java.sun.com/help.jspa?sec=formatting -
B1DiEventService: ERROR :Connect throw an exception: Host is unknown
Hi,
I tried to create an event service. I followed the example of VB code. When I try to connect to the service using following code:
Function Connect() As Boolean
Try
' Create an instance of B1DIEventsService, Company object as parameter
evtService = New B1DIEventsService.B1DIEventsService(oCompany)
'Connect to the service
evtService.Connect(New B1DIEventsService.B1DIEventsConnectionLostDelegate(AddressOf OnServerShutdown))
Return True
Catch ex As B1DIEventsService.B1DIEventsException
SBO_Application.MessageBox("EVENT_ERROR :" + ex.Message)
Catch ex As Exception
SBO_Application.MessageBox("ALG_ERROR :" + ex.Message)
End Try
Return False
End Function
I get the message EVENT_ERROR :Connect throw an exception. Host is unknown
I'm using the examples for 2005 SP01 private connections.
Logfile shows following info:
TIME;LEVEL;INFO;
31-5-2007 15:22:26;INFOPLUS;TraceLevel: Warning
31-5-2007 15:22:26;INFOPLUS;PortNumber: 4334
31-5-2007 15:22:26;INFOPLUS;KeepAlivePeriod: 2000000
31-5-2007 15:22:26;INFOPLUS;KeepAliveMax: 12000000
31-5-2007 15:22:26;INFOPLUS;MaxSizeAction: Replace
31-5-2007 15:22:26;INFOPLUS;MaxFileSize: 6000000
31-5-2007 15:22:28;INFOPLUS;Connect to server.
31-5-2007 15:22:29;INFOPLUS;Client: Reference to server acquired
31-5-2007 15:22:34;ERROR;Connect throw an exception: <u>Host is onbekend</u>
The last part (underlined) is dutch and means "Host is unknown."
Can anyone help please?
Thanks and Regards,
SanderHi Sander,
It seems like the name or adress of the server is unknown for the machine, it cannot connect to it or the server is not running.
Is your oCompany object initialized and connected to the DI API before creating the B1DIEventsService?
Have you tried to run client and server side in the same machine to do a small test?
The problem is at the .NET Remoting interface, it cannot connect to it.
Regards
Trinidad. -
Word 2013 - MSI Install vs. One-Click Install - COM Exception Error
Hello -
we have a 3rd party control that sits on top of word to render word documents. In a MSI installation of Word 2013 everything works fine. When we use the one-click installation the rendering does not work and the system throws a com exception
error.
it basically says "The document is not associated with an ActiveX Document server. at OfficeControlLIB.IOfficeControl.OpenLocalfile...
there is a suggested fix @ http://stackoverflow.com/questions/19778211/office-2013-click-to-run-installer-and-activex-issue/26890815#26890815
where you modify the registry to insert :
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{F4754C9B-64F5-4B40-8AF4-679732AC0607}\DocObject]
into the registry - however this did not work (note we looked up the CLSID for our OCX and replaced.
Any ideas?Hi,
So it's a 32-bit version of Office which is running on a 32-bit version of Windows, try to omit
Wow6432Node from the registry keys and see if it works.
It's a 3rd party control, there is no way for us to understand how exactly it works. I'd suggest you contact the vendor support of that control for further assistance.
Regards,
Ethan Hua
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
I have a problem in both CS5.5 and CS6 on MacOS X.
During a drag operation onto an InDesign document, I import and place some images onto a page. This normally works without issue except in one case. The problem case is when I'm trying to import an image that is the same file path as a broken link on the document. This will crash InDesign everytime.
Let me provide some details.
First, I create an InDesign document, drag some images from the Finder and place them on the page and save the InDesign document to file. Now I go to the Finder and delete the images (or just move them to a different Folder). I then go back to InDesign and look at the Links panel where the red stop signs now appear near the images to show that the links are broken.
Next I go to a panel that I'm working on where I can drag an item from the panel and onto the InDesign document page. In this I have a ProcessDragDropCommand method that over rides the method in the CDragDropTargetFlavorHelper class, and during that method it copies the images that I just deleted back into their original locations on the file system.
After copying the files, the process then tries to import one of the images into a new frame using the PlaceFileInFrame method from the InDesign SDK file SDKLayoutHelper.cpp. This method creates a kImportAndPlaceCmdBoss and when executing the line:
if (CmdUtils::ProcessCommand(importAndPlaceCmd) != kSuccess) {
causes an exception that appears in the crash report as:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILUE at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
with a stack trace that points to the CmdUtils::ProcessCommand() line mentioned above.
I've tried relinking the images before the import and place, but that still doesn't work. If I break the process up so that in one drag event I copy the missing files back into place and relink them, then in a second drag event I then do an import and place it all works okay. It's just when I try the full task of copy images into place in the file system, relink the images on the InDesign document and then import and place an image in a new frame on the InDesign page that the exception is appearing.
Instead of the kImportAndPlaceCmdBoss I've also tried the kImportAndLoadPlaceGunCmdBoss with the same problem.
Interestingly, in the SDKLayoutHelper method PlaceFileInFrame that I'm using, there's a pragma message:
#pragma message("LINKREWORK: Temporary, fix this up later!")
// TODO: LINKREWORK fix.
From the wording I'm wondering if this is related to the problem that I'm seeing. In which case does anyone know what this fix might entail?
I've tried tried relinking using ReinitResource and UpdateLinks methods that are a part of the ILkniFacade but that doesn't seem to help stop the crash.
Oddly, I can generate a strange and maybe related error (that doesn't use my plugins and just the raw InDesign functionality) if I do something like:
In InDesign, create an InDesign document.
From the Finder, drag some images onto the InDesign document page.
In InDesign, save the document.
In the Finder, rename the folder containing the images.
In InDesign, check that the links really are broken with the red stop signs appearing.
In the Finder, rename the folder containing the images back to what it was before.
(Extra Step)
In the Finder, redrag the same images that you did before onto the InDesign page.
This will cause InDesign to throw up the following error message:
Either the file does not exist, you do not have permission, or the file may be in use by another application
Of course, if in the above you introduce an Extra Step where you just go back to InDesign and do nothing. InDesign will relink the once missing images, so that when you go back to the Finder to drag the images there's now no problem.
This is almost like InDesign needs a few IdleTasks in order to sort out its perception of the file system. If that's the case then I'm a bit stuck as I'm trying to do everything during a single drag operation and there's no chance of any IdleTasks occuring.
Any ideas?I have checked the Tomcat log, which does not give
much information:
----- Root Cause -----
org.apache.artimus.message.exceptions.MessageDAOSysExce
tion: Error executing SQL in
ThreadHandler.createThread.
at
org.apache.artimus.message.dao.MySQLMessageDAO.createT
read(MySQLMessageDAO.java:54)
at
org.apache.artimus.message.ThreadHandler.insertThread(
hreadHandler.java:42)
at
org.apache.artimus.message.StoreMessage.execute(StoreM
ssage.java:61)
at
org.apache.struts.action.RequestProcessor.processActio
Perform(RequestProcessor.java:484)Tomcat has more than one log file. The servlet's System.out messages must be going to a different file if this is all you are seeing. Either look in the other log files or change the lines
se.printStackTrace();
throw new MessageDAOSysException("Error executing SQL in ThreadHandler.createThread."); // line 54 where the problem occurredto simply read:
throw se;and the actual Exception you want to investigate will go in to the file where you found the above. This will be less useful in the long run as you'll have the same problem when you want to query the SQLException further with System.out.println(se.getSQLState()); etc.
You could add a logging configuration to your servlets context in server.xml so you can define where such messages get logged.
Alternatively you could use a logging API like log4j. -
Office 365 Sandbox Solution EventReceiver throwing Remote Exception in ItemAdding
Hi,
I created a sandbox webpart for O365 with EventReceivers with ItemAdding for Document Library and while i upload a document to library in O365 sharepoint site application throws below exception:-
System.Runtime.Remoting.RemotingException: Server encountered an internal error. For more information, turn off customErrors in the server's .config file.
Server stack trace:
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type us
Same code works perfectly on my Development machine, Please help. Below is the Code
base.EventFiringEnabled = false;
bool isFile = (properties.AfterProperties["vti_filesize"] != null);
if (isFile == true)
SPWeb currentWeb = properties.OpenWeb();
// Get foldername from url like Document/EC10001/filename.txt
string folderName = properties.AfterUrl.Split(new char[] { '/' })[1];
SPList spList = currentWeb.Lists[properties.List.ID];
SPQuery spQuery = new SPQuery();
spQuery.Query = "<OrderBy><FieldRef Name='Modified' Ascending='FALSE'/></OrderBy>";
//Getting the folder object from the list
SPFolder folder = spList.RootFolder.SubFolders[folderName];
//Set the Folder property
spQuery.Folder = folder;
int fileSequenceId = 0;
SPListItemCollection items = spList.GetItems(spQuery);
if (items.Count > 0)
string documentID = items[0]["DocumentID"] != null ? items[0]["DocumentID"].ToString() : string.Empty;
if (!string.IsNullOrEmpty(documentID))
string splitNumber = documentID.Split(new char[] { '-' })[1];
fileSequenceId = Convert.ToInt32(splitNumber) + 1;
else
properties.ErrorMessage = "Unable to generate Document Id";
properties.Cancel = true;
else
fileSequenceId = 1;
// Set DocumentID like EC10001-001
properties.AfterProperties["DocumentID"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));
// Retrive "EEC000" string from Constant List
properties.AfterProperties["vti_title"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));
// Retrive "EEC000" string from Constant List
base.EventFiringEnabled = true;
Thanks,
Pranay Chandra SapaHi,
According to your description, my understanding is that when you upload document in Office 365 site, the event receiver in sandbox solution throws error.
Per my knowledge, if you want to use event receiver in Office 365 environment, you need to use remote event receiver instead the normal event receiver in an app.
Here are some detailed articles for your reference:
Create a remote event receiver in apps for SharePoint
Handle events in apps for SharePoint
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Throws Run time error at runtime.
Hi freinds,
I've downloaded special jar file and placed in "C:\j2sdk1.4.2_11\jre\lib\ext".
I've used one of the IO class from this jar file in my Candies.java class.
When i going to compile it from command prompt it compiles dine but at run time while running following command ,
D:\TP>javac Candies.java
D:\TP>java Candies
Exception in thread "main" java.lang.NoClassDefFoundError: ncst/pgdst/IOException
When i compile and run this code with IDE 'JCreator' it works fine.
Why the same application throws run time error at command prompt?
How could i resolve this issue ?
Note:I've also set classpath to "C:\j2sdk1.4.2_11\jre\lib\ext\." .
Regards,
Sachin Warang.If i placed the jar file some where else how could
used it in my source file?To use a class in your source code, you just import its package and make sure the jar is on the classpath, nothing else is necessary.
I'm stick to command prompt as i want include the
input file(which contains big input) at run time
using the command
D:\TP>java Candies < input
Is it possible with any IDE to include such text file
at run time , if so how could i do this?All IDEs let their users specify parameters for programs they start from within the IDE. See doc of your IDE. (But people here don't recommend IDEs for beginners ;)
But why it compiles fine and giving me Error at run
time if it is not set in the classpath?Looks like it is because that class is not used directly in your code but your code calls another class that uses that missing class.
I've also change the classpath to
"C:\j2sdk1.4.2_11\jre\lib\ext\pgdst.jar\." still the
problem exist , why is it so as i'm giving the actual
path now?You still don't specify the exact jar! E.g: C:\j2sdk1.4.2_11\jre\lib\ext\pgdst.jar\aa.jar
Hope it helps... -
Exception error: While consuming webservice
While trying to consume webservice from other server. We get the following error
"I/O Exception: Name in certificate 'URL' does not match host name 'URL'
The code works fine in development environment. Whereas, when we are trying to consume with/without the port number as 443 using cfhttp method. It is throwing the above error.
Environment :
Coldfusion 8
SQL Server 2005
Which we are consuming is :
Java/J2EE.
Can you please help us? If you require any other details kindly let me know.
Thanks,
Satheesh.Try setting the resultFormat on your HTTPService to e4x.
HTH;
Amy -
Hi,
1) Internal User expected exception:
Exception: Payments,apply credits,disputes and print are not supported when multiple customer/currency transactions are selected
2) External User is throwing below error instead of throwing above exception.
Error
You are trying to access a page that is no longer active.
The referring page may have come from a previous session. Please select Home
to proceed.
found this MACCHECK from fnd logs of external user payment.
MACCHECK: . Parameter failing validation is :mode. The parameter mode with value MultiPay could not be recognized as part of Server's response on the previous request. Incoming URL is : /OA_HTML/OA.jsp?page=/oracle/apps/ar/irec/endeca/webui/EndecaDummyPG . Current URL is : /OA_HTML/OA.jsp?page=/oracle/apps/ar/irec/endeca/webui/OIREndecaCustHomePG&akRegionApplicationId=222&_ti=1125493452&oapc=10&retainAM=Y&addBreadCrumb=N&oas=6-LL4ndIUFLX-2zjQAQD6A.. . Referer URL is : https://<hostname>:4443/endeca/web/ar/customer?doAsUserLanguageId=en_US&languageId=en_US . HTTP Request Method is : POST
can someone please help.
Thanks,
RRSWell, I compared my classpath between my windows batch file and the
makefile (that comes with the samples installation) on Solaris and realized
that I am using different sets of jars.
So, I removed the extra jars from the makefile to narrow down the
problem. If I remove the /opt/SUNWam/lib/servlet.jar from the makefile,
I can reproduce this problem on the Solaris box as well.
When I include this servlet.jar on my windows machine the program works!
Only jars I have in my classpath are amclientsdk.jar and servlet.jar which
I have copied from my installation (/opt/SUNWam/lib) on the Solaris box.
Just the same way, by copying the am_services.jar, saaj-api.jar, and jaxm-api.jar,
from the Solarix box to the windows machine,
I am also able to pull the assertions from the Access Manager.
I installed Sun Java Enterprise System 2005Q1 on a Solaris 10 machine.
During the installation, I configured to install the Access Manager
in Sun Application Server.
Why do I need to have different set of jars on the windows machine
for the Access Manager client SDK ?
Could you please point me to a download link where I could download
the correct Windows Access Manager Client SDK for
Sun Java System Access Manager 6.0 (Sun JES 2005Q1)?
Thanks. -
Throwing an exception from XSLT
Just wanted to share a finding with the Oracle XDB community and possibly suggest an enhancement to the xdb product development team (care of MDRAKE).
I had a scenario where I wanted to throw an exception from the XSLT.
A little Googling revealed this helpful post:
http://weblogs.asp.net/george_v_reilly/archive/2006/03/01/439402.aspx
...so I gave it a shot.
In my XSLT, I have a <xsl:choose> block with the following <xsl:otherwise> block:
<xsl:otherwise>
<xsl:message terminate="yes">Unknown Document Type</xsl:message>
</xsl:otherwise>I used a stub test to run this through, giving it a file which would exercise the exception:
select xmltype(bfilename('XML_RESOURCES', 'data.xml'),0).transform(xmltype(bfilename('XML_RESOURCES', 'sanitize_xml.dev.xsl'),0))
from dual;..and to my 'joy', I did get an exception:
ORA-30998: transformation error: execution of compiled XSLT on XML DOM failedHmm...would of been nicer to get something like what Eclipse/Xalan pops out:
file:/H:/eclipse_indigo_workspace/XSLT/sanitize_xml.xsl; Line #28; Column #59; Unknown Document Type
(Location of error unknown)Stylesheet directed termination...i.e. my custom error message "Unknown Document Type" isn't output by Oracle.
Just to be safe, I tried a file which would NOT exercise this xsl:otherwise block and it did run through OK.
So, could XDB report a better error?
Thoughts?SQL> VAR XSL VARCHAR2(4000)
SQL> --
SQL> begin
2 :XSL :=
3 '<?xml version="1.0" encoding="UTF-8"?>
4 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5 <xsl:output method="xml" indent="yes"/>
6 <xsl:template match="/">
7 <Result>
8 <xsl:choose>
9 <xsl:when test="Input=''1''">
10 <Output>1</Output>
11 </xsl:when>
12 <xsl:when test="Input=''2''">
13 <xsl:message>The value is 2</xsl:message>
14 <Output>2</Output>
15 </xsl:when>
16 <xsl:when test="Input=''3''">
17 <xsl:message terminate="no">The value is 3</xsl:message>
18 <Output>3</Output>
19 </xsl:when>
20 <xsl:otherwise>
21 <xsl:message terminate="yes">Invalid value</xsl:message>
22 <Output>Bad Input</Output>
23 </xsl:otherwise>
24 </xsl:choose>
25 </Result>
26 </xsl:template>
27 </xsl:stylesheet>';
28 end;
29 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> select XMLTRANSFORM(XMLTYPE('<Input>1</Input>'),XMLTYPE(:XSL))
2 from dual
3 /
<?xml version="1.0" encoding="WINDOWS-1252"?>
<Result>
<Output>1</Output>
</Re
Elapsed: 00:00:00.01
SQL> select XMLTRANSFORM(XMLTYPE('<Input>2</Input>'),XMLTYPE(:XSL))
2 from dual
3 /
<?xml version="1.0" encoding="WINDOWS-1252"?>
<Result>
<Output>2</Output>
</Re
Elapsed: 00:00:00.00
SQL> select XMLTRANSFORM(XMLTYPE('<Input>3</Input>'),XMLTYPE(:XSL))
2 from dual
3 /
<?xml version="1.0" encoding="WINDOWS-1252"?>
<Result>
<Output>3</Output>
</Re
Elapsed: 00:00:00.01
SQL> select XMLTRANSFORM(XMLTYPE('<Input>4</Input>'),XMLTYPE(:XSL))
2 from dual
3 /
ERROR:
ORA-30998: transformation error: execution of compiled XSLT on XML DOM failed
no rows selected
Elapsed: 00:00:00.01
SQL>
SQL>The actuall error is not unreasonalbe. The Execution did fail beacuse you terminated it.. Contacting Oralce Support may be a little excessive...
Now with respect to message the question is where...
We 'could' output into the same buffer as is used by DBMS_OUTPUT, but that has limits in terms of the amount of output that can be generated.
We could write it to the trace file, but that may be difficulat for a developer to get to
We could write it to a log file in the XDB repository, but where and how to name it...
We could another parameter to XMLTransform, which would be a Message Buffer
All of these are in effect enhancements..
BTW I checked with XML Spy and they seem to ignore message too, so I'm wondering how widely used this is...
We cannot add it to the output of the XSL since XMLTransform defines the output of the XML to be well formed XML, and adding a random set of text nodes would viloate that rule.. -
Ant throws the exception when builds B2B
Hi,
Ant throws the exception:
default.application.xml:
[style] Processing D:B2B_DEVsap_earmeta-inf.b2bapplication.xml to D:B2B
_DEVproject_earmeta-inf.b2b_devMETA-INFapplication.xml
[style] Loading stylesheet D:B2B_DEVbintemplatesapplication.xsl
[style] Failed to process D:B2B_DEVsap_earmeta-inf.b2bapplication.xml
BUILD FAILED
D:B2B_DEVbinbuild.xml:113: The following error occurred while executing this
line:
D:B2B_DEVprojectbuildmodification.xml:102: The following error occurred while
executing this line:
D:B2B_DEVbinearbuilder.xml:78: The following error occurred while executing t
his line:
D:B2B_DEVbinearbuilder.xml:16: javax.xml.transform.TransformerConfigurationEx
ception: Could not load stylesheet. org.w3c.dom.DOMException: Prefix is 'xmlns',
but URI is not 'http://www.w3.org/2000/xmlns/' in the qualified name, 'xmlns:xs
l'
How to fix it?
The configuration is MS Windows XP SP2, MS SQL Server 2000 Developer Edition SP4, SAP Web AS 6.40 SP18, Apache Ant 1.6.5, Build Tool, j2sdk1.4.2_07.
Any help will be appreciated.
Regards,
Roman BabkinHi,
have you tried to urlencode the hash char?
Might be interesting as well if the problem also occours when you point to a local script in your url. The script should then contain a static link to your xml file.
cheers,
jossif
Maybe you are looking for
-
Can we create a (RAC) db service to assign a conc mgr to an instance
Hi Everyone, Can we create a rac db service to for EBusiness? For example, can we create a service for AP module to run on instance1 of a two nodes RAC, and a service for PO to run on instance2. I know i can assign a node to a conc mgr and use the sp
-
When I turn my HP lap top on, I have a high pitched sound coming from my speakers. The sound doesn't go awy when I play music.
-
I had to reset my ipod network settings now safari wont even open
and yes im connected to wifi
-
I've bought a couple of new CD's recently and tried to import them into iTunes but my computer doesn't even recognize the CD. It seems like it tries to read the CD for about 30 seconds or so, then it just ejects it. No error message or anything. I wo
-
CS4 not supported on PowerPC G5...
In spite of the specifications indicated here: http://helpx.adobe.com/creative-suite/kb/system-requirements-cs4-point-products.html#main_ MacintoshSystemReqs, my attempt to use InDesign CS4 installed with CS4 Design displayed the ever popular: "Not s