IllegalArgumentException: no ':' in URL

Hi,
I just dont know why when my MIDlet try to invoke my servlet program through web server. It gives java.lang.IllegalArgumentException: no ':' in URL. I really don't know why. Can anybody help? Pls.
When user's press button to trigger this part:
And I pass url = "http://localhost/mywapapp/servletname to that function
public void move(String url) throws IOException {
HttpConnection c = null;
InputStream is = null;
OutputStream os = null;
StringBuffer b = new StringBuffer();
try {
c = (HttpConnection)Connector.open(url);
c.setRequestMethod(HttpConnection.GET);
c.setRequestProperty("User-Agent",
"Profile/MIDP-1.0 Confirguration/CLDC-1.0");
c.setRequestProperty("Content-Language",
"en-CA");
os = c.openOutputStream();
is = c.openDataInputStream();
int ch;
while ((ch = is.read()) != -1) {
//b.append((char) ch);
//System.out.println((char)ch);
} finally {
if(is!= null) {
is.close();
if(os != null) {
os.close();
if(c != null) {
c.close();

Hi
I'm sorry that I waste ur time to look it this, I solved it, I kind of make careless mistakes. THx!

Similar Messages

  • Page fragment suddenly won't open (11g)

    I am unable to open a .jsff file and have no idea how to fix the problem.
    The project has a reference to an ADF Library Jar that seems to be the problem.
    I have rerun the deployment on to generate the reference jar: adflibCsa_common1.jar. But that does not help.
    How does a JAR URL get bad?
    Full stacktrace below:
    Feb 10, 2009 1:26:14 PM oracle.bali.xml.addin.XMLSourceNode
    SEVERE: Exception creation XmlModel or XmlContext for ViewAllAdminUsersTemplate.jsff
    java.lang.IllegalArgumentException: Invalid JAR URL: jar:jar:file:/C:/JDev_projects/csa-multiappws/maintainUsers/ProjectLibs/adflibCsa_common1.jar!/adflibCsa_common1.jar!/
    at oracle.ide.net.JarUtil.getJarFileURL(JarUtil.java:152)
    at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:275)
    at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:253)
    at oracle.jdeveloper.java.locator.JarURLClassLocator.buildIndex(JarURLClassLocator.java:103)
    at oracle.jdeveloper.java.locator.JarURLClassLocator.getResourceURL(JarURLClassLocator.java:337)
    at oracle.jdeveloper.java.locator.BaseClassLocator.getResourceURLs(BaseClassLocator.java:53)
    at oracle.jdeveloper.java.locator.ArrayClassLocator.getResourceURLs(ArrayClassLocator.java:230)
    at oracle.jdeveloper.java.util.JRLClassLoader.findResources(JRLClassLoader.java:100)
    at java.lang.ClassLoader.getResources(ClassLoader.java:1016)
    at oracle.adf.share.services.ServicesFactory.findServiceRefs(ServicesFactory.java:64)
    at oracle.adf.share.services.ResourceService.getResourcesForType(ResourceService.java:47)
    at oracle.adf.share.services.ResourceService.getResourcesForType(ResourceService.java:103)
    at oracle.adfdtinternal.view.rich.pagelayout.provider.ResourceServicePageLayoutProvider.getPageLayoutInfos(ResourceServicePageLayoutProvider.java:34)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry._recreateProjectPageLayoutInfos(PageLayoutRegistry.java:142)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry.<init>(PageLayoutRegistry.java:109)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry.getInstance(PageLayoutRegistry.java:30)
    at oracle.adfdtinternal.view.rich.pagelayout.metadata.PageTemplateProjectMDProvider.<init>(PageTemplateProjectMDProvider.java:63)
    at oracle.adfdtinternal.view.rich.pagelayout.metadata.PageTemplateProjectMDSource.getMetadataProvider(PageTemplateProjectMDSource.java:30)
    at oracle.jdeveloper.model.JspContextExtensionRegistry.getExtendingMetadataProvider(JspContextExtensionRegistry.java:82)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.createAdditionalMetadataProvider(JspProjectMetadataRegistry.java:173)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.createEntry(JspProjectMetadataRegistry.java:134)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getEntry(JspProjectMetadataRegistry.java:112)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getEntry(JspProjectMetadataRegistry.java:94)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getFacesJspTagMapper(JspProjectMetadataRegistry.java:68)
    at oracle.jdevimpl.webapp.jsp.taglibraries.jsf.JsfAddin$FacesConfigMetadataProviderSource.getMetadataProvider(JsfAddin.java:335)
    at oracle.jdeveloper.model.JspContextExtensionRegistry.getExtendingMetadataProvider(JspContextExtensionRegistry.java:107)
    at oracle.jdeveloper.model.JspSourceNode.createMetadataProvider(JspSourceNode.java:490)
    at oracle.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1402)
    at oracle.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1372)
    at oracle.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:182)
    at oracle.bali.xml.gui.jdev.JDevXmlContext.getXmlContext(JDevXmlContext.java:227)
    at oracle.bali.xml.gui.jdev.AbstractXmlVisualEditor.setContext(AbstractXmlVisualEditor.java:244)
    at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.setContext(AbstractWebAppEditor.java:240)
    at oracle.jdevimpl.webapp.editor.jsp.JspEditor.setContext(JspEditor.java:161)
    at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:158)
    at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:94)
    at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
    at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
    at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
    at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
    at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1400)
    at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1334)
    at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1260)
    at oracle.ideimpl.navigator.OpenEditorController.whenOpenEditor(OpenEditorController.java:41)
    at oracle.ideimpl.navigator.OpenEditorContextMenuListener.handleDefaultAction(OpenEditorContextMenuListener.java:51)
    at oracle.ide.controller.ContextMenuListenersHook$LazyContextMenuListener.handleDefaultAction(ContextMenuListenersHook.java:199)
    at oracle.ide.controller.ContextMenu.fireDefaultAction(ContextMenu.java:412)
    at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1792)
    at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:2127)
    at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:2148)
    at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:198)
    at java.awt.Component.processEvent(Component.java:5899)
    at java.awt.Container.processEvent(Container.java:2023)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
    at java.awt.Container.dispatchEventImpl(Container.java:2067)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    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.net.MalformedURLException: no !/ in spec
    at java.net.URL.<init>(URL.java:601)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at oracle.ide.net.JarUtil.newJarFileURLImplImpl(JarUtil.java:582)
    at oracle.ide.net.JarUtil.getJarFileURL(JarUtil.java:121)
    ... 68 more
    Feb 10, 2009 1:26:14 PM oracle.bali.xml.addin.XMLSourceNode
    SEVERE: Exception creation XmlModel or XmlContext for ViewAllAdminUsersTemplate.jsff
    java.lang.IllegalArgumentException: Invalid JAR URL: jar:jar:file:/C:/JDev_projects/csa-multiappws/maintainUsers/ProjectLibs/adflibCsa_common1.jar!/adflibCsa_common1.jar!/
    at oracle.ide.net.JarUtil.getJarFileURL(JarUtil.java:152)
    at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:275)
    at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:253)
    at oracle.jdeveloper.java.locator.JarURLClassLocator.buildIndex(JarURLClassLocator.java:103)
    at oracle.jdeveloper.java.locator.JarURLClassLocator.getResourceURL(JarURLClassLocator.java:337)
    at oracle.jdeveloper.java.locator.BaseClassLocator.getResourceURLs(BaseClassLocator.java:53)
    at oracle.jdeveloper.java.locator.ArrayClassLocator.getResourceURLs(ArrayClassLocator.java:230)
    at oracle.jdeveloper.java.util.JRLClassLoader.findResources(JRLClassLoader.java:100)
    at java.lang.ClassLoader.getResources(ClassLoader.java:1016)
    at oracle.adf.share.services.ServicesFactory.findServiceRefs(ServicesFactory.java:64)
    at oracle.adf.share.services.ResourceService.getResourcesForType(ResourceService.java:47)
    at oracle.adf.share.services.ResourceService.getResourcesForType(ResourceService.java:103)
    at oracle.adfdtinternal.view.rich.pagelayout.provider.ResourceServicePageLayoutProvider.getPageLayoutInfos(ResourceServicePageLayoutProvider.java:34)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry._recreateProjectPageLayoutInfos(PageLayoutRegistry.java:142)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry.<init>(PageLayoutRegistry.java:109)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry.getInstance(PageLayoutRegistry.java:30)
    at oracle.adfdtinternal.view.rich.pagelayout.metadata.PageTemplateProjectMDProvider.<init>(PageTemplateProjectMDProvider.java:63)
    at oracle.adfdtinternal.view.rich.pagelayout.metadata.PageTemplateProjectMDSource.getMetadataProvider(PageTemplateProjectMDSource.java:30)
    at oracle.jdeveloper.model.JspContextExtensionRegistry.getExtendingMetadataProvider(JspContextExtensionRegistry.java:82)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.createAdditionalMetadataProvider(JspProjectMetadataRegistry.java:173)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.createEntry(JspProjectMetadataRegistry.java:134)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getEntry(JspProjectMetadataRegistry.java:112)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getEntry(JspProjectMetadataRegistry.java:94)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getFacesJspTagMapper(JspProjectMetadataRegistry.java:68)
    at oracle.jdevimpl.webapp.jsp.taglibraries.jsf.JsfAddin$FacesConfigMetadataProviderSource.getMetadataProvider(JsfAddin.java:335)
    at oracle.jdeveloper.model.JspContextExtensionRegistry.getExtendingMetadataProvider(JspContextExtensionRegistry.java:107)
    at oracle.jdeveloper.model.JspSourceNode.createMetadataProvider(JspSourceNode.java:490)
    at oracle.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1402)
    at oracle.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1372)
    at oracle.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:182)
    at oracle.bali.xml.gui.jdev.JDevXmlContext.getXmlContext(JDevXmlContext.java:227)
    at oracle.jdevimpl.webapp.jsp.OpenJspEditorContextMenuListener$1.run(OpenJspEditorContextMenuListener.java:58)
    at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:643)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.net.MalformedURLException: no !/ in spec
    at java.net.URL.<init>(URL.java:601)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at oracle.ide.net.JarUtil.newJarFileURLImplImpl(JarUtil.java:582)
    at oracle.ide.net.JarUtil.getJarFileURL(JarUtil.java:121)
    ... 33 more
    Feb 10, 2009 1:26:14 PM oracle.bali.xml.addin.XMLSourceNode
    SEVERE: Exception creation XmlModel or XmlContext for ViewAllAdminUsersTemplate.jsff
    java.lang.IllegalArgumentException: Invalid JAR URL: jar:jar:file:/C:/JDev_projects/csa-multiappws/maintainUsers/ProjectLibs/adflibCsa_common1.jar!/adflibCsa_common1.jar!/
    at oracle.ide.net.JarUtil.getJarFileURL(JarUtil.java:152)
    at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:275)
    at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:253)
    at oracle.jdeveloper.java.locator.JarURLClassLocator.buildIndex(JarURLClassLocator.java:103)
    at oracle.jdeveloper.java.locator.JarURLClassLocator.getResourceURL(JarURLClassLocator.java:337)
    at oracle.jdeveloper.java.locator.BaseClassLocator.getResourceURLs(BaseClassLocator.java:53)
    at oracle.jdeveloper.java.locator.ArrayClassLocator.getResourceURLs(ArrayClassLocator.java:230)
    at oracle.jdeveloper.java.util.JRLClassLoader.findResources(JRLClassLoader.java:100)
    at java.lang.ClassLoader.getResources(ClassLoader.java:1016)
    at oracle.adf.share.services.ServicesFactory.findServiceRefs(ServicesFactory.java:64)
    at oracle.adf.share.services.ResourceService.getResourcesForType(ResourceService.java:47)
    at oracle.adf.share.services.ResourceService.getResourcesForType(ResourceService.java:103)
    at oracle.adfdtinternal.view.rich.pagelayout.provider.ResourceServicePageLayoutProvider.getPageLayoutInfos(ResourceServicePageLayoutProvider.java:34)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry._recreateProjectPageLayoutInfos(PageLayoutRegistry.java:142)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry.<init>(PageLayoutRegistry.java:109)
    at oracle.adfdtinternal.view.rich.pagelayout.registry.PageLayoutRegistry.getInstance(PageLayoutRegistry.java:30)
    at oracle.adfdtinternal.view.rich.pagelayout.metadata.PageTemplateProjectMDProvider.<init>(PageTemplateProjectMDProvider.java:63)
    at oracle.adfdtinternal.view.rich.pagelayout.metadata.PageTemplateProjectMDSource.getMetadataProvider(PageTemplateProjectMDSource.java:30)
    at oracle.jdeveloper.model.JspContextExtensionRegistry.getExtendingMetadataProvider(JspContextExtensionRegistry.java:82)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.createAdditionalMetadataProvider(JspProjectMetadataRegistry.java:173)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.createEntry(JspProjectMetadataRegistry.java:134)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getEntry(JspProjectMetadataRegistry.java:112)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getEntry(JspProjectMetadataRegistry.java:94)
    at oracle.jdevimpl.webapp.jsp.metadata.JspProjectMetadataRegistry.getFacesJspTagMapper(JspProjectMetadataRegistry.java:68)
    at oracle.jdevimpl.webapp.jsp.taglibraries.jsf.JsfAddin$FacesConfigMetadataProviderSource.getMetadataProvider(JsfAddin.java:335)
    at oracle.jdeveloper.model.JspContextExtensionRegistry.getExtendingMetadataProvider(JspContextExtensionRegistry.java:107)
    at oracle.jdeveloper.model.JspSourceNode.createMetadataProvider(JspSourceNode.java:490)
    at oracle.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1402)
    at oracle.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1372)
    at oracle.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:182)
    at oracle.bali.xml.gui.jdev.JDevXmlContext.getXmlContext(JDevXmlContext.java:227)
    at oracle.bali.xml.gui.jdev.AbstractXmlVisualEditor.setContext(AbstractXmlVisualEditor.java:244)
    at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.setContext(AbstractWebAppEditor.java:240)
    at oracle.jdevimpl.webapp.editor.jsp.JspEditor.setContext(JspEditor.java:161)
    at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:158)
    at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:94)
    at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
    at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
    at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
    at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
    at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1400)
    at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1334)
    at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1260)
    at oracle.jdevimpl.webapp.jsp.OpenJspEditorContextMenuListener.open(OpenJspEditorContextMenuListener.java:122)
    at oracle.jdevimpl.webapp.jsp.OpenJspEditorContextMenuListener.mav$open(OpenJspEditorContextMenuListener.java:25)
    at oracle.jdevimpl.webapp.jsp.OpenJspEditorContextMenuListener$1$1.run(OpenJspEditorContextMenuListener.java:65)
    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.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1047)
    at java.awt.Dialog$3.run(Dialog.java:1099)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1097)
    at java.awt.Component.show(Component.java:1447)
    at java.awt.Component.setVisible(Component.java:1400)
    at java.awt.Window.setVisible(Window.java:824)
    at java.awt.Dialog.setVisible(Dialog.java:987)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:389)
    at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:243)
    at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:215)
    at oracle.jdevimpl.webapp.jsp.OpenJspEditorContextMenuListener$2.run(OpenJspEditorContextMenuListener.java:81)
    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.net.MalformedURLException: no !/ in spec
    at java.net.URL.<init>(URL.java:601)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at oracle.ide.net.JarUtil.newJarFileURLImplImpl(JarUtil.java:582)
    at oracle.ide.net.JarUtil.getJarFileURL(JarUtil.java:121)
    ... 72 more

    Hi Donald,
    Go to ~/Library/Caches/com.apple.Safari and move the "cache.db" file to the Trash.
    Try usairways now.
    ~ (Tilde) represents your Home Folder.
    If that didn't help, from the Safari Menu Bar click Safari/Preferences then select the Show Cookies button. Delete all usairways related cookies. Now click the Autofill tab from the Preferences menu. Click the Edit button next to: Other forms. Delete .usairways.com.
    Relaunch Safari. Try logging into usairways. If you still have problems...
    Open Keychain Access (Applications/Utilities) Select Passwords on the left.
    Delete the usairways keychain. Relaunch Safari and try again. When prompted, click Yes.
    Carolyn

  • FileConnection problems

    Hi,
    I have an xml file which I would like to parse, for some reason I can not read the file. It would be great if I could get any help. I am using the Sony Ericsson wtk. I am using the SonyEricsson K750i emulator. I have stored the file (called map.xml) is stored in its root1 and c:/ and e:/ directory (I have tried accessing all of them). My code to access is as follows:
    FileConnection conn;
              InputStream in = null;
              try {
                   System.out.println("Does it get here?");
                   conn = (FileConnection)Connector.open(xmlUri);
                   if(!conn.exists()){
                        conn.create();
                   in = conn.openInputStream();
                   Reader reader = new InputStreamReader(in);this continues on to parse the file(which havent tested out yet)
    this gives a null pointer exception
    before I call this code I call the following methods
    private void walkEntireDirectoryStructure(){
              System.out.println("Starting to walk Directory Structure");
              Enumeration e = FileSystemRegistry.listRoots();
              while (e.hasMoreElements()){
                   String root = (String)e.nextElement();
                System.out.println("Root found: " + root);
                try {
                        FileConnection fc = (FileConnection)Connector.open(root);
                        if(fc.isDirectory()){
                             System.out.println("Is a directory");
                             walkDirectoryTree(fc);
                        }else{
                             System.out.println("NOT a directory");
                   } catch (IOException e1) {
                        System.out.println("Failed to open fileConnection! " + e.toString());
                   } catch(Throwable e1){
                        System.out.println("Yep, it's crap");
                        e1.printStackTrace();
              System.out.println("Finished Walking Directory Structure");
         private void walkDirectoryTree(FileConnection fc){
              try {
                   Enumeration files = fc.list();
                   while(files.hasMoreElements()){
                        String file = (String)files.nextElement();
                        System.out.println("Found: " + file);
                        FileConnection fileConn = (FileConnection)Connector.open(file);
                        if(fileConn.isDirectory()){
                             System.out.println("Found Directory: " + file + " |Starting to walk!");
                             walkDirectoryTree(fileConn);
                        }else{
                             System.out.println("Found File: " + file);
                        System.out.println("Found fil");
              } catch (IOException e) {
                   System.out.println("Failed to get Enumeration of files: " + e.toString());
         }This should show all the files in the directories root1, c:/ and e:/
    sample error code is:
    *Running with storage root root1
    Starting to walk Directory Structure
    Root found: c:/
    java.lang.ClassNotFoundException: com/sun/midp/io/j2me/c/Protocol
         at javax.microedition.io.Connector.openPrim(+255)
         at javax.microedition.io.Connector.open(+15)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at valerie.xml.UnMarshal.walkEntireDirectoryStructure(+51)
         at valerie.xml.UnMarshal.parse(+4)
         at valerie.ui.screens.TestXmlScreen$ParseXML.run(+14)
    java.lang.ClassNotFoundException: com/sun/midp/io/j2me/c/Protocol
         at javax.microedition.io.Connector.openPrim(+255)
         at javax.microedition.io.Connector.open(+40)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at valerie.xml.UnMarshal.walkEntireDirectoryStructure(+51)
         at valerie.xml.UnMarshal.parse(+4)
         at valerie.ui.screens.TestXmlScreen$ParseXML.run(+14)
    Failed to open fileConnection! javax.microedition.io.file.FileSystemRegistry$1@1a4cfaaa
    Root found: e:/
    java.lang.ClassNotFoundException: com/sun/midp/io/j2me/e/Protocol
         at javax.microedition.io.Connector.openPrim(+255)
         at javax.microedition.io.Connector.open(+15)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at valerie.xml.UnMarshal.walkEntireDirectoryStructure(+51)
         at valerie.xml.UnMarshal.parse(+4)
         at valerie.ui.screens.TestXmlScreen$ParseXML.run(+14)
    java.lang.ClassNotFoundException: com/sun/midp/io/j2me/e/Protocol
         at javax.microedition.io.Connector.openPrim(+255)
         at javax.microedition.io.Connector.open(+40)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at valerie.xml.UnMarshal.walkEntireDirectoryStructure(+51)
         at valerie.xml.UnMarshal.parse(+4)
         at valerie.ui.screens.TestXmlScreen$ParseXML.run(+14)
    Failed to open fileConnection! javax.microedition.io.file.FileSystemRegistry$1@1a4cfaaa
    Root found: root1/
    Yep, it's crap
    java.lang.IllegalArgumentException: no ':' in URL
         at javax.microedition.io.Connector.openPrim(+37)
         at javax.microedition.io.Connector.open(+15)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at valerie.xml.UnMarshal.walkEntireDirectoryStructure(+51)
         at valerie.xml.UnMarshal.parse(+4)
         at valerie.ui.screens.TestXmlScreen$ParseXML.run(+14)
    Finished Walking Directory Structure
    Uncaught exception java/lang/IllegalArgumentException: no ':' in URL.
    Does it get here?
    Execution completed.
    0 bytecodes executed*

    Well, just a quick try to answer your question:
    1. You got ClassNotFoundException...
    Are you sure you have included:
    import javax.microedition.io.file.*;
    import java.util.Enumeration; ? Maybe you have as you got no compilation error...
    2. All file browsing should be performed in a separate thread. - inside run()
    3. I've managed to develop a system traversing file system up and down the tree. 2 short code snippets:
            //browsing root list
            try
                Enumeration enumRoots = FileSystemRegistry.listRoots();
                String currentRoot = null;
                while (enumRoots.hasMoreElements())
                   currentRoot = (String) enumRoots.nextElement();
                   //do sth. with currentRoot
          catch(IllegalArgumentException e)
           catch (SecurityException e)
          catch(Exception e)
          //browsing folder list  (try + catch omitted).  m_fileConn is a member variable and was opened with:
           m_fileConn = (FileConnection) Connector.open("file:///"+m_sNewSubpath, Connector.READ); 
           m_fileConn.setFileConnection(m_sNewSubpath);  //usage of a subtath. Initially a root. then a folder inside the root.  (could be ".." when going up)
           if(m_fileConn.isDirectory())
              String element;
              Enumeration dirElements = m_fileConn.list();
              while (dirElements.hasMoreElements())
                  element = (String)dirElements.nextElement();
                  //use element           
           else
                //...

  • URLClassLoader won't load class

    I'm having a problem with a class not being loaded after its jar is sent to a URLClassLoader. The jar file exists (I check this before adding it to the URL[] that gets passed into the URLClassLoader) but the class doesn't get loaded. I get a "java.lang.ClassNotFoundException: com.tester.MainClass". I'm stuck as to what might be the problem.
    I'm not sure if it matters, but the "directory" where the jar resides is the resource folder inside a bundle in OSX.
    Here is the code snippet:
    String tok = strTok.nextToken();
    File f = new File(tok);
    if (!f.exists())
    continue;
    try {
    System.out.println("Adding URL:" + f.toURL().toString());
    urlList.add(f.toURL());
    } catch (MalformedURLException e) {
    throw new IllegalArgumentException(e.toString());
    URL[] urls = (URL[])urlList.toArray(new URL[1]);
    theClassName = theClassName.replaceAll("/", ".");
    ClassLoader loader = new URLClassLoader(urls);
    Class clazz = loader.loadClass(theClassName);
    I notice that when I print out the f.toURL(), the url is in the form of "file:/Library/..(rest of the path)". Is this the proper url for a file in OSX or should there be any additional slashes after "file:"?
    Thank you everyone for any help.
    PD

    Often times firewalls are set to not allow downloading of classes and/or jars. The Firewall must be set to allow these types of files.

  • Authenticating URL gives IllegalArgumentException

    Hi,
    I am trying to connect to an URL by authenticating it.
    URL l_url = new URL(artemisServiceURL);
    URLConnection urlConnection = l_url.openConnection();
    String val = “<ARTEMIS_USER>:<ARTEMIS_PASSWORD>”;
    byte[] base = val.getBytes();
    String authorizationString = "Basic " + Base64.encode(base);
    authorizationString = authorizationString.replaceAll(“\\r|\\n”, “”);
    urlConnection.setRequestProperty ("Authorization", authorizationString);
    InputStream inputStream = l_url.openStream();
    But I get following error: -
    java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic QTIxMjE5NTpOMWdIdE1AcjM=
    To resolve this, I tried following: -
    - I googled about this error and it appears that it is some known bug in Base64 encoding that inserts '\n' character.
    Hence, I tried to replace all newline chars in authentication string but still it results in same error.
    - Also I tried type casting URL connection with HttpUrlConnection. But it also results in 400 : Bad request
    Please help.
    Thanks and regards,
    Amey

    Unfortunately, the Authenticator doesnt seem to have any effect?
    I am getting this in InputStream: -
         <html><head><title>Apache Tomcat/5.5.20 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;backgroun-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>This request requires HTTP authentication ().</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.20</h3></body></html>
    Here is the code I used: -
    Authenticator.setDefault (new MyAuthenticator ());
    URL url = new URL (artemisServiceURL);
    InputStream content = (InputStream)url.getContent();
    if(content == null){
         messageManager.reportWarning("content = null");     
    }else{
    BufferedReader in = new BufferedReader (new InputStreamReader (content));
    String line;
    while ((line = in.readLine()) != null) {
    //code to print lines to log
    class MyAuthenticator extends Authenticator { 
         protected PasswordAuthentication getPasswordAuthentication() {
         return new PasswordAuthentication(ARTEMIS_USER, ARTEMIS_PASSWORD.toCharArray());
    What is going wrong now?

  • IllegalArgumentException when opening an URL

    Hi,
    I am trying to open a URL which has some kind of special character inside.
    This special character causes a IllegalArgumentException when I try to open it with Java while it works fine opening it in my Firefox Browser.
    The code is:
    String url = "http://www.flunk.de/webkatalog/forum/rtl-und-coca-cola-heimspiel-wg-ich-brauch-h%EDlfe-t335.html";
    URL urlObj = new URL(url);
    try {
      InputSource source = new InputSource(url.openStream());
    } catch (IOException e) {
      e.printStackTrace();
    }This causes an exception with the following StackTrace:
    java.lang.IllegalArgumentException
    at sun.net.www.ParseUtil.decode(Unknown Source)
    at sun.net.www.ParseUtil.toURI(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)The Problem seems to be the "%ED" part of the URL. If I delete that part, no exception occures which doesn't help me, since the url is no more correct and I don't reach the correct website with it.
    Does anybody know, how I can avoid that?
    Thanks,
    Henrik

    Oh sorry - of course I tried this one:
    String url = "http://www.flunk.de/webkatalog/forum/rtl-und-coca-cola-heimspiel-wg-ich-brauch-h%EDlfe-t335.html";
    URL urlObj = new URL(url);
    try {
      InputSource source = new InputSource(urlObj.openStream());
    } catch (IOException e) {
      e.printStackTrace();
    }Message was edited by:
    HenrikH

  • IllegalArgumentException  while executing a scenario in ODI

    Hi All,
    We are executing a scenario in ODI. This loads the data from source table to target table . During this execution, we are facing the issue in the insert step(Error msg given below):
    “java.lang.IllegalArgumentException: Bytes are too big for array”. The attachment shows the screenshot of the error.
    The code that is generated during execution is
    select     
         SUBSTR(SIF_AR_TL.REC_TYPE,1,1) RECORD_TYPE,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUSINESS_UNIT,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUSINESS_UNIT_FROM,
         RPAD(' ',5,' ') AFFILIATE,
         RPAD(' ',8,' ') C_REG_ACCT,
         RPAD(' ',10,' ') DEPTID,
         RPAD(' ',10,' ') DEPTID_FROM,
         RPAD(' ',6,' ') PRODUCT,
         RPAD(' ',8,' ') PROJECT_ID,
         RPAD(' ',5,' ') PROJECT_TYPE,
         RPAD(' ',8,' ') ACTIVITY_ID,
         RPAD(' ',5,' ') ACTIVITY_TYPE,
         RPAD(' ',4,' ') C_VINTAGE,
         RPAD(' ',1,' ') COST_TYPE,
         RPAD(' ',5,' ') COST_STUDY,
         '+'||RPAD('0',14,'0') SALETX_AMT,
         '+'||RPAD('0',14,'0') USETAX_AMT,
         TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))),' ') C_GL_LOC,
         TRIM(TO_CHAR(SIF_AR_TL.LEDGER))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.LEDGER))),' ') LEDGER,
         TRIM(TO_CHAR(SIF_AR_TL.LEDGER_GRP))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.LEDGER_GRP))),' ') LEDGER_GROUP,
         RPAD(' ',10,' ') JOURNAL_ID,
         RPAD(' ',10,' ') SAP_DOC_NUM,
         RPAD(' ',2,' ') UNPOST_SEQ_NUM,
         RPAD(' ',9,' ') FILLER,
         TRIM(TO_CHAR(SIF_AR_TL.CURRENCY_CD))||RPAD(' ',3-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.CURRENCY_CD))),' ') CURRENCY_CD,
         RPAD(' ',8,' ') FILLER1,
         RPAD(' ',1,' ') CONDITION_CODE,
         RPAD(' ',5,' ') C_ACCT_ISSUE,
         RPAD(' ',5,' ') RESOURCE_CATEGORY,
         RPAD(' ',4,' ') C_PC_ORIGIN_COP,
         RPAD(' ',10,' ') TREE_NODE_NUM,
         RPAD(' ',10,' ') TREE_NODE_NUM_FROM,
         RPAD(' ',10,' ') C_TAX_DISTRICT,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUSINESS_UNIT_GL,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))|| RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUS_UNIT_GL_FROM,
         TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))),' ') C_GL_LOC_ORIG,
         RPAD(' ',7,' ') FILLER2,
         TRIM(TO_CHAR(SIF_AR_TL.JOURNAL_SRC))||RPAD(' ',7-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.JOURNAL_SRC))),' ') JOURNAL_SOURCE,
         TRIM(TO_CHAR(SIF_AR_TL.C_LEGACY_SRC))||RPAD(' ',4-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.C_LEGACY_SRC))),' ') C_LEGACY_SRC,
         TRIM(TO_CHAR(SIF_AR_TL.TRAN_DATE))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.TRAN_DATE))),' ') TRAN_DATE,
         TRIM(TO_CHAR(SIF_AR_TL.REFERENCE_ID))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.REFERENCE_ID))),' ') REFERENCE_ID,
         'SAP' SYSTEM_SOURCE,
         RPAD(' ',10,' ') C_MIC,
         RPAD(' ',5,' ') FILLER3,
         RPAD(' ',6,' ') C_FUNC_CODE,
         RPAD(' ',1,' ') C_ENVIRONMENT,
         RPAD(' ',13,' ') VOUCHER_ID,
         RPAD(' ',6,' ') JFCI,
         RPAD(' ',10,' ') PO_ID,
         RPAD(' ',7,' ') C_ALLOC_CODE,
         TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_DT))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_DT))),' ') ACCOUNTING_DT,
         RPAD('0',3-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_PRD))),'0')||TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_PRD)) ACCOUNTING_PERIOD,
         RPAD(' ',5,' ') CATEGORY,
         TRIM(TO_CHAR(SIF_AR_TL.LOCATION))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.LOCATION))),' ') LOCATION,
         RPAD(' ',2,' ') C_KOW,
         RPAD(' ',12,' ') TAG_NUMBER,
         RPAD(' ',20,' ') B_EQP_SER,
         TRIM(TO_CHAR(SIF_AR_TL.FISCAL_YEAR))||RPAD(' ',4-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.FISCAL_YEAR))),' ') FISCAL_YEAR,
         RPAD(' ',1,' ') C_HIGHWAY_PRIVATE,
         RPAD(' 0',3,'0 ') EQUITY,
         RPAD(' ',1,' ') C_GEO_AREA,
         RPAD(' ',8,' ') OPRID,
         CASE WHEN CAST(SIF_AR_TL.HOURS AS NUMBER)>= 0 THEN '+'||RPAD('0',14-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.HOURS)),'.','')),'0')||TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.HOURS)),'.','') ELSE'-'||RPAD('0',15-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.HOURS)),'.','')),'0')||TRIM(SUBSTR(TRANSLATE(TO_CHAR(SIF_AR_TL.HOURS),'.',''),2,LENGTH(TRANSLATE(TO_CHAR(SIF_AR_TL.HOURS),'.',''))))
    END QUANTITY,
         '+'||RPAD('0',14,'0') HOURS,
         CASE WHEN SUBSTR(SIF_AR_TL.SAP_GL_ACCT,1,1) = '5' THEN
         'R'||RPAD(' ',5,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.REVENUE_CATEGORY))||
              RPAD(' ',5-length(TRIM(TO_CHAR(SIF_AR_TL.REVENUE_CATEGORY))),' ')||
         RPAD(' ',19,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.REVENUE_UNIT))||
              RPAD(' ',3-length(TRIM(TO_CHAR(SIF_AR_TL.REVENUE_UNIT))),' ')||
         TRIM(SIF_AR_TL.REVENUE_COMPONENT)||
              RPAD(' ',3-length(TRIM(TO_CHAR(SIF_AR_TL.REVENUE_COMPONENT))),' ')||
         RPAD(' ',5,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.MARKET))||
              RPAD(' ',4-length(TRIM(TO_CHAR(SIF_AR_TL.MARKET))),' ')||
         RPAD(' ',13,' ')
    ELSE
         'F'||RPAD(' ',10,' ')||RPAD(' ',7,' ')||RPAD(' ',7,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.SAP_ORG_OPRID))||
              RPAD(' ',7-length(TRIM(TO_CHAR(SIF_AR_TL.SAP_ORG_OPRID))),' ')||
         TRIM(TO_CHAR(SIF_AR_TL.SAP_HDR_DESC))||
              RPAD(' ',25-length(TRIM(TO_CHAR(SIF_AR_TL.SAP_HDR_DESC))),' ')||
         RPAD(' ',1,' ')
         END C_WORK_AREA,
         TRIM(TO_CHAR(SIF_AR_TL.FCC_ACCOUNT))||RPAD(' ',6-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.FCC_ACCOUNT))),' ') C_LEGACY_TYPE,
         RPAD(' ',1,' ') FCC_ACCOUNT,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_GL_ACCT))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_GL_ACCT))),' ') FILLER5,
         CASE
    WHEN SIF_AR_TL.VENDOR ='' THEN SIF_AR_TL.POSTING_KEY||TRIM(TO_CHAR(SIF_AR_TL.CUSTOMER))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.CUSTOMER))),' ')||RPAD(' ',6,' ')
    WHEN SIF_AR_TL.CUSTOMER ='' THEN SIF_AR_TL.POSTING_KEY||TRIM(TO_CHAR(SIF_AR_TL.VENDOR))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.VENDOR))),' ')||RPAD(' ',6,' ')
    WHEN (SIF_AR_TL.VENDOR ='' AND SIF_AR_TL.CUSTOMER = '') THEN SIF_AR_TL.POSTING_KEY||RPAD(' ',16,' ') END SAP_GL_ACCOUNT,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_CMPNY_CD))||RPAD(' ',4-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_CMPNY_CD))),' ') SAP_ALLOCATION_NBR,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))),' ') SAP_COMPANY_CODE,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))),' ') SAP_COST_CENTER,
         SIF_AR_TL.SAP_JURISDICTION SAP_JURISDICTION,
         RPAD(' ',10,' ') MATERIAL_ID,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_TRD_PARTNER))||RPAD(' ',6-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_TRD_PARTNER))),' ') SAP_TRADING_PARTNER,
         RPAD(' ',9,' ') LEG_VENDOR_CODE,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_WBS))||RPAD(' ',24-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_WBS))),' ') SAP_WBS,
         RPAD(' ',3,' ') LABOR_GROUP,
         RPAD(' ',7,' ') WORK_ORDER_NBR,
         RPAD(' ',3,' ') LEG_TRANS_TYPE,
         RPAD(' ',4,' ') SAP_COMPANY_CODE_CHRG,
         RPAD(' ',2,' ') MATERIAL_TYPE,
         RPAD(' ',6,' ') FILLER6,
         CASE WHEN SIF_AR_TL.TRAN_TOT_AMT>= 0 THEN '+'||RPAD('0',14-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT)),'.','')),'0')||TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT)),'.','') ELSE'-'||RPAD('0',15-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT)),'.','')),'0')||TRIM(SUBSTR(TRANSLATE(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT),'.',''),2,LENGTH(TRANSLATE(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT),'.',''))))
    END TRANS_TOT_AMOUNT,
         '01' EXTC_RESRC_OCCURS,
         RPAD(' ',5,' ') EXTC_CD_1,
         RPAD(' ',5,' ') RESOURCE_TYPE_1,
         RPAD(' ',8,' ') ACCOUNT_1,
         CASE WHEN SIF_AR_TL.AMOUNT_1>= 0 THEN '+'||RPAD('0',14-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.AMOUNT_1)),'.','')),'0')||RPAD(TRIM(TO_CHAR(SIF_AR_TL.AMOUNT_1)),'.','') ELSE'-'||RPAD('0',15-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.AMOUNT_1)),'.','')))||TRIM(SUBSTR(TRANSLATE(TO_CHAR(SIF_AR_TL.AMOUNT_1),'.',''),2,LENGTH(TRANSLATE(TO_CHAR(SIF_AR_TL.AMOUNT_1),'.',''))))
    END AMOUNT_1,
         RPAD(' ',5,' ') EXTC_CD_2,
         RPAD(' ',5,' ') RESOURCE_TYPE_2,
         RPAD(' ',8,' ') ACCOUNT_2,
         RPAD(' ',15,' ') AMOUNT_2,
         RPAD(' ',5,' ') EXTC_CD_3,
         RPAD(' ',5,' ') RESOURCE_TYPE_3,
         RPAD(' ',8,' ') ACCOUNT_3,
         RPAD(' ',15,' ') AMOUNT_3,
         RPAD(' ',5,' ') EXTC_CD_4,
         RPAD(' ',5,' ') RESOURCE_TYPE_4,
         RPAD(' ',8,' ') ACCOUNT_4,
         RPAD(' ',15,' ') AMOUNT_4,
         RPAD(' ',5,' ') EXTC_CD_5,
         RPAD(' ',5,' ') RESOURCE_TYPE_5,
         RPAD(' ',8,' ') ACCOUNT_5,
         RPAD(' ',15,' ') AMOUNT_5,
         RPAD(' ',5,' ') EXTC_CD_6,
         RPAD(' ',5,' ') RESOURCE_TYPE_6,
         RPAD(' ',8,' ') ACCOUNT_6,
         RPAD(' ',15,' ') AMOUNT_6,
         RPAD(' ',5,' ') EXTC_CD_7,
         RPAD(' ',5,' ') RESOURCE_TYPE_7,
         RPAD(' ',8,' ') ACCOUNT_7,
         RPAD(' ',15,' ') AMOUNT_7,
         RPAD(' ',5,' ') EXTC_CD_8,
         RPAD(' ',5,' ') RESOURCE_TYPE_8,
         RPAD(' ',8,' ') ACCOUNT_8,
         RPAD(' ',15,' ') AMOUNT_8,
         RPAD(' ',5,' ') EXTC_CD_9,
         RPAD(' ',5,' ') RESOURCE_TYPE_9,
         RPAD(' ',8,' ') ACCOUNT_9,
         RPAD(' ',15,' ') AMOUNT_9,
         RPAD(' ',5,' ') EXTC_CD_10,
         RPAD(' ',5,' ') RESOURCE_TYPE_10,
         RPAD(' ',8,' ') ACCOUNT_10,
         RPAD(' ',15,' ') AMOUNT_10,
         RPAD(' ',5,' ') EXTC_CD_11,
         RPAD(' ',5,' ') RESOURCE_TYPE_11,
         RPAD(' ',8,' ') ACCOUNT_11,
         RPAD(' ',15,' ') AMOUNT_11,
         RPAD(' ',5,' ') EXTC_CD_12,
         RPAD(' ',5,' ') RESOURCE_TYPE_12,
         RPAD(' ',8,' ') ACCOUNT_12,
         RPAD(' ',15,' ') AMOUNT_12,
         RPAD(' ',5,' ') EXTC_CD_13,
         RPAD(' ',5,' ') RESOURCE_TYPE_13,
         RPAD(' ',8,' ') ACCOUNT_13,
         RPAD(' ',15,' ') AMOUNT_13,
         RPAD(' ',5,' ') EXTC_CD_14,
         RPAD(' ',5,' ') RESOURCE_TYPE_14,
         RPAD(' ',8,' ') ACCOUNT_14,
         RPAD(' ',15,' ') AMOUNT_14,
         RPAD(' ',5,' ') EXTC_CD_15,
         RPAD(' ',5,' ') RESOURCE_TYPE_15,
         RPAD(' ',8,' ') ACCOUNT_15,
         RPAD(' ',15,' ') AMOUNT_15,
         RPAD(' ',5,' ') EXTC_CD_16,
         RPAD(' ',5,' ') RESOURCE_TYPE_16,
         RPAD(' ',8,' ') ACCOUNT_16,
         RPAD(' ',15,' ') AMOUNT_16,
         RPAD(' ',5,' ') EXTC_CD_17,
         RPAD(' ',5,' ') RESOURCE_TYPE_17,
         RPAD(' ',8,' ') ACCOUNT_17,
         RPAD(' ',15,' ') AMOUNT_17,
         RPAD(' ',5,' ') EXTC_CD_18,
         RPAD(' ',5,' ') RESOURCE_TYPE_18,
         RPAD(' ',8,' ') ACCOUNT_18,
         RPAD(' ',15,' ') AMOUNT_18,
         RPAD(' ',5,' ') EXTC_CD_19,
         RPAD(' ',5,' ') RESOURCE_TYPE_19,
         RPAD(' ',8,' ') ACCOUNT_19,
         RPAD(' ',15,' ') AMOUNT_19,
         RPAD(' ',5,' ') EXTC_CD_20,
         RPAD(' ',5,' ') RESOURCE_TYPE_20,
         RPAD(' ',5,' ') ACCOUNT_20,
         RPAD(' ',8,' ') AMOUNT_20,
         RPAD(' ',15,' ') EXTC_CD_21,
         RPAD(' ',5,' ') RESOURCE_TYPE_21,
         RPAD(' ',5,' ') ACCOUNT_21,
         RPAD(' ',8,' ') AMOUNT_21,
         RPAD(' ',15,' ') EXTC_CD_22,
         RPAD(' ',5,' ') RESOURCE_TYPE_22,
         RPAD(' ',8,' ') ACCOUNT_22,
         RPAD(' ',15,' ') AMOUNT_22,
         TO_NUMBER(SIF_AR_TL.HDR_ID_OUT) REC_GRP
    from     FSDV1ODI.PS_O_FS_SIF_AR_TL SIF_AR_TL LEFT OUTER JOIN FSDV1ODI.PS_O_FS_SIF_AR_HDR PS_O_FS_SIF_AR_HDR ON PS_O_FS_SIF_AR_HDR.HDR_ID=SIF_AR_TL.HDR_ID_OUT
    where      (1=1)
    If anybody has faced the above issue, kindly revert back on the same.
    Thanking in Advance.
    Regards,
    Raghav

    i hope you have resolved the question.
    However there is the note on metalink
    "Bytes are too big for array" Error When Inserting Data To A File In ODI [ID 554792.1]
    in which you can read
    Solution
    Run the select SQL startement that extracts data directly on the database and examine the data returned to make sure the data is valid and correct.
    Check source and target Datastores in both environments to make sure the columns' size and datatype are the same and the target File Datastore's columns size are big enough for the source data.
    In Topology, check the File JDBC Driver name and URL in both environments to make sure driver used is the same and the driver property ENCODING is set to the correct value if it is used. The default encoding value is ISO8859_1 which might not be appropriate if the source data is stored in
    a UTF8 database.
    Check the Locale values and Encodings used on the different servers.
    For example, for Oracle, check the NLS_CHARACTERSET setting in both environments. Take a look at Note 453080.1 for an example on the Locale.
    Finally, the ODI File Driver has the following property that can be used to truncate the long data to fit the fields size of the File Datastore if needed:
    TRUNC_FIXED_STRINGS=TRUE|FALSE: Truncates the strings from the fixed files to the field size. Default value is FALSE.
    TRUNC_DEL_STRINGS=TRUE|FALSE: Truncates the strings from the delimited files to the field size. Default value is FALSE.
    For example, if your target file is delimited, you can try:
    jdbc:snps:dbfile&TRUNC_DEL_STRINGS=TRUE
    Basically you are mapping a source column longer than tarhet.
    DecaXD

  • Error processing XML request, java.lang.IllegalArgumentException

    Hi all,
    In my code I can successfully connect to server and send the content which is an XML content:
    param = java.net.URLEncoder.encode(s, "UTF-8");
    java.io.PrintWriter out = new java.io.PrintWriter(connection.getOutputStream());
    out.print(param);
    Read the response from server:
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
    while((input = in.readLine()) != null)
    response += input + "\r";
    System.out.println("Client : received : "+response);
    Following is the response I receive from server:
    Client : received : <html><h1>Error processing XML request</h1>java.lang.IllegalArgumentException: No xml request posted</html>
    Has anybody know what the problem is? Why this error is issued?
    Any help is greatly appreciated.

    Dear legosa,
    Thanks so much for the replies. What you wrote makes absolute sence, w/o flush() or close(), it seems that I'm sending only balnk to output!
    I don't know how can I fix the 500 Internal Server Error; below is my complete code that does this part, can you tell me if you see sth. wrong in this code?
    param = java.net.URLEncoder.encode(aTrans.xmlDoc, "UTF-8");
    url = new URL("https://xml.test.surepay.com");
    connection = (HttpURLConnection)url.openConnection();                    
    connection.setDoInput(true);
    connection.setDoOutput(true);
    connection.setUseCaches(false);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
    String sLen = "" + param.length();
    connection.setRequestProperty("Content-length", sLen);
    connection.setRequestProperty("Accept", "text/plain");
    connection.connect();
    System.out.println("Client : Connected");
    java.io.PrintWriter out = new java.io.PrintWriter(connection.getOutputStream());
    System.out.println("Client : Writing Content");
    out.print(param);
    out.close();
    System.out.println(connection.getURL());          
    System.out.println(connection.getResponseCode() + " " + connection.getResponseMessage());
    System.out.println(connection.getURL());
    System.out.println("Client : Waiting for response from Server");
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
    System.out.println("Client : Opened input stream");
    while((input = in.readLine()) != null)
    response += input + "\r";
    System.out.println("Client : received : "+response);

  • Problems With url-pattern in a filter-mapping

    Hi!
    I need to make a filter when the clients call a jsf pages in /pages in my web application, but when i make the filter-mapping like this:
         <filter-mapping>
              <filter-name>sessionFilter</filter-name>
              <url-pattern>/pages/*.jsf</url-pattern>
         </filter-mapping>An exception appears:
    SEVERE: Parse error in application web.xml
    java.lang.IllegalArgumentException: Invalid <url-pattern> /pages/*.jsf in filter mapping
         at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
         at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1548)
         at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:263)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:624)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)the <url-pattern>/pages/*</url-pattern> not work to me because process all pages, I nedd only *.jsf
    Please Help me whit this.

    "the <url-pattern>/pages/*</url-pattern> not work to me because process all pages, I nedd only *.jsf"
    Yes but in the filter you can get the url from the request.getUrl() and then only process requests that contain .jsf. Simply just pass all other requests along.
    Some information on url pattern matching:
    http://edocs.bea.com/wls/docs61/webapp/components.html#113049

  • Dynamic URL creation in Adapter Module

    I have a situation in which I need to create a dynamic URL to send data using an HTTP POST ( using  HTTPS).
    I created an UDF to use Dynamic Configuration, this works fine for the UrlParam in the HTTP CC and the TServerLocation in the SOAP CC.
    My issue is that both variables have the same limitation of 200 chars max, and sometimes the URL is longer than 200 chars (I have to pass more than 20 parameters in the URL). The message mapping with the UDF fails whenever I try to put more than 200 chars in the Dynamic Configuration Variables. Therefore I cannot use Dynamic Configuration.
    I'm now thinking of creating an Adapter Module which creates an URL out of the XML message passed to the adapter, and use this value to overrule the URL defined in the Communication Channel. The URL field in the Communication Channel does not have a  200 chars limitation.
    Does anybody know how to do this? Is it possible to replace the value of the URL field in the Communication Channel with another  value in an Adapter Module?
    I have to pass the data as parameters in the URL, not as Header fields in the message.
    Thanks,
    Andre

    Hello Chris,
    The error is:
    RuntimeException during appliction Java mapping com/sap/xi/tf/_mm_paymentClusterCreate_ Thrown: com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-field mapping /ns0:mt_newPaymentClusterData/merchant_name; root message: Exception:[java.lang.IllegalArgumentException: Value is too long (471/200):
    It's even in the SAP Help:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce299c3a8e5430e10000000a42189b/frameset.htm
    The length of the attribute value is defined by the XI message protocol. Values can be a maximum of 200 characters long. If, for example, you assign longer values in the mapping or adapter modules then this can lead to processing errors at runtime or the values are shortened to 200 characters. This shortening can also lead to a processing error. The processing error that occurs depends on the components that access the attributes.

  • Launching Browser from Java when Browser URL is very  long

    Hi,
    I am trying to launch a browser from Java.
    I am doing the following.
    String command = "cmd" + "/c" + "start" + " browserURL";
    Process p = Runtime.getRuntime()exec(command);
    Note: My browserURL is very long.
    Now the browser is invoked. But the URL shown is incomplete and hence
    browser is unable to open the required application.
    Can someone help me in this.
    One way is to increase the buffer size on the command prompt?
    Is there any java command for this?
    Is there any other way to solve this issue.
    Thanks,
    AR

    this is my second time posting this, take note of it. I can't remember where i got it from, but credits go to the person that wrote it. It has helped me out thousands of times!!!
    to use, compile, then call from your program:
    org.newio.utils.BrowserLauncher.openURL("your url here")dfwtc
    package org.newio.utils;
    import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.*;
    public class BrowserLauncher
        private static int jvm;
        private static Object browser;
        private static boolean loadedWithoutErrors;
        private static Class mrjFileUtilsClass;
        private static Class mrjOSTypeClass;
        private static Class macOSErrorClass;
        private static Class aeDescClass;
        private static Constructor aeTargetConstructor;
        private static Constructor appleEventConstructor;
        private static Constructor aeDescConstructor;
        private static Method findFolder;
        private static Method getFileType;
        private static Method makeOSType;
        private static Method putParameter;
        private static Method sendNoReply;
        private static Object kSystemFolderType;
        private static Integer keyDirectObject;
        private static Integer kAutoGenerateReturnID;
        private static Integer kAnyTransactionID;
        private static final int MRJ_2_0 = 0;
        private static final int MRJ_2_1 = 1;
        private static final int WINDOWS_NT = 2;
        private static final int WINDOWS_9x = 3;
        private static final int OTHER = -1;
        private static final String FINDER_TYPE = "FNDR";
        private static final String FINDER_CREATOR = "MACS";
        private static final String GURL_EVENT = "GURL";
        private static final String FIRST_WINDOWS_PARAMETER = "/c";
        private static final String SECOND_WINDOWS_PARAMETER = "start";
        private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote 'openURL(";
        private static final String NETSCAPE_OPEN_PARAMETER_END = ")'";
        private static String errorMessage;
        private BrowserLauncher()
        private static boolean loadClasses()
            switch(jvm)
            default:
                break;
            case 0: // '\0'
                try
                    Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
                    macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
                    Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
                    Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
                    Class aeClass = Class.forName("com.apple.MacOS.ae");
                    aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
                    aeTargetConstructor = aeTargetClass.getDeclaredConstructor(new Class[] {
                        Integer.TYPE
                    appleEventConstructor = appleEventClass.getDeclaredConstructor(new Class[] {
                        Integer.TYPE, Integer.TYPE, aeTargetClass, Integer.TYPE, Integer.TYPE
                    aeDescConstructor = aeDescClass.getDeclaredConstructor(new Class[] {
                        java.lang.String.class
                    makeOSType = osUtilsClass.getDeclaredMethod("makeOSType", new Class[] {
                        java.lang.String.class
                    putParameter = appleEventClass.getDeclaredMethod("putParameter", new Class[] {
                        Integer.TYPE, aeDescClass
                    sendNoReply = appleEventClass.getDeclaredMethod("sendNoReply", new Class[0]);
                    Field keyDirectObjectField = aeClass.getDeclaredField("keyDirectObject");
                    keyDirectObject = (Integer)keyDirectObjectField.get(null);
                    Field autoGenerateReturnIDField = appleEventClass.getDeclaredField("kAutoGenerateReturnID");
                    kAutoGenerateReturnID = (Integer)autoGenerateReturnIDField.get(null);
                    Field anyTransactionIDField = appleEventClass.getDeclaredField("kAnyTransactionID");
                    kAnyTransactionID = (Integer)anyTransactionIDField.get(null);
                    break;
                catch(ClassNotFoundException cnfe)
                    errorMessage = cnfe.getMessage();
                    return false;
                catch(NoSuchMethodException nsme)
                    errorMessage = nsme.getMessage();
                    return false;
                catch(NoSuchFieldException nsfe)
                    errorMessage = nsfe.getMessage();
                    return false;
                catch(IllegalAccessException iae)
                    errorMessage = iae.getMessage();
                return false;
            case 1: // '\001'
                try
                    mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
                    mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
                    Field systemFolderField = mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
                    kSystemFolderType = systemFolderField.get(null);
                    findFolder = mrjFileUtilsClass.getDeclaredMethod("findFolder", new Class[] {
                        mrjOSTypeClass
                    getFileType = mrjFileUtilsClass.getDeclaredMethod("getFileType", new Class[] {
                        java.io.File.class
                    break;
                catch(ClassNotFoundException cnfe)
                    errorMessage = cnfe.getMessage();
                    return false;
                catch(NoSuchFieldException nsfe)
                    errorMessage = nsfe.getMessage();
                    return false;
                catch(NoSuchMethodException nsme)
                    errorMessage = nsme.getMessage();
                    return false;
                catch(SecurityException se)
                    errorMessage = se.getMessage();
                    return false;
                catch(IllegalAccessException iae)
                    errorMessage = iae.getMessage();
                return false;
            return true;
        private static Object locateBrowser()
            if(browser != null)
                return browser;
            switch(jvm)
            case 0: // '\0'
                try
                    Integer finderCreatorCode = (Integer)makeOSType.invoke(null, new Object[] {
                        "MACS"
                    Object aeTarget = aeTargetConstructor.newInstance(new Object[] {
                        finderCreatorCode
                    Integer gurlType = (Integer)makeOSType.invoke(null, new Object[] {
                        "GURL"
                    Object appleEvent = appleEventConstructor.newInstance(new Object[] {
                        gurlType, gurlType, aeTarget, kAutoGenerateReturnID, kAnyTransactionID
                    return appleEvent;
                catch(IllegalAccessException iae)
                    browser = null;
                    errorMessage = iae.getMessage();
                    return browser;
                catch(InstantiationException ie)
                    browser = null;
                    errorMessage = ie.getMessage();
                    return browser;
                catch(InvocationTargetException ite)
                    browser = null;
                    errorMessage = ite.getMessage();
                    return browser;
            case 1: // '\001'
                File systemFolder;
                try
                    systemFolder = (File)findFolder.invoke(null, new Object[] {
                        kSystemFolderType
                catch(IllegalArgumentException iare)
                    browser = null;
                    errorMessage = iare.getMessage();
                    return browser;
                catch(IllegalAccessException iae)
                    browser = null;
                    errorMessage = iae.getMessage();
                    return browser;
                catch(InvocationTargetException ite)
                    browser = null;
                    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
                    return browser;
                String systemFolderFiles[] = systemFolder.list();
                for(int i = 0; i < systemFolderFiles.length; i++)
                    try
                        File file = new File(systemFolder, systemFolderFiles);
    if(file.isFile())
    Object fileType = getFileType.invoke(null, new Object[] {
    file
    if("FNDR".equals(fileType.toString()))
    browser = file.toString();
    return browser;
    catch(IllegalArgumentException iare)
    browser = browser;
    errorMessage = iare.getMessage();
    return null;
    catch(IllegalAccessException iae)
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    catch(InvocationTargetException ite)
    browser = null;
    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
    return browser;
    browser = null;
    break;
    case 2: // '\002'
    browser = "cmd.exe";
    break;
    case 3: // '\003'
    browser = "command.com";
    break;
    case -1:
    default:
    browser = "netscape";
    break;
    return browser;
    public static void openURL(String url)
    throws IOException
    if(!loadedWithoutErrors)
    throw new IOException("Exception in finding browser: " + errorMessage);
    Object browser = locateBrowser();
    if(browser == null)
    throw new IOException("Unable to locate browser: " + errorMessage);
    switch(jvm)
    case 0: // '\0'
    Object aeDesc = null;
    try
    try
    aeDesc = aeDescConstructor.newInstance(new Object[] {
    url
    putParameter.invoke(browser, new Object[] {
    keyDirectObject, aeDesc
    sendNoReply.invoke(browser, new Object[0]);
    catch(InvocationTargetException ite)
    throw new IOException("InvocationTargetException while creating AEDesc: " + ite.getMessage());
    catch(IllegalAccessException iae)
    throw new IOException("IllegalAccessException while building AppleEvent: " + iae.getMessage());
    catch(InstantiationException ie)
    throw new IOException("InstantiationException while creating AEDesc: " + ie.getMessage());
    break;
    finally
    aeDesc = null;
    browser = null;
    case 1: // '\001'
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    break;
    case 2: // '\002'
    case 3: // '\003'
    Runtime.getRuntime().exec(new String[] {
    (String)browser, "/c", "start", url
    break;
    case -1:
    Process process = Runtime.getRuntime().exec((String)browser + " -remote 'openURL(" + url + ")'");
    try
    int exitCode = process.waitFor();
    if(exitCode != 0)
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    catch(InterruptedException ie)
    throw new IOException("InterruptedException while launching browser: " + ie.getMessage());
    break;
    default:
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    break;
    static
    loadedWithoutErrors = true;
    String osName = System.getProperty("os.name");
    if("Mac OS".equals(osName))
    String mrjVersion = System.getProperty("mrj.version");
    String majorMRJVersion = mrjVersion.substring(0, 3);
    try
    double version = Double.valueOf(majorMRJVersion).doubleValue();
    if(version == 2D)
    jvm = 0;
    } else
    if(version >= 2.1000000000000001D)
    jvm = 1;
    } else
    loadedWithoutErrors = false;
    errorMessage = "Unsupported MRJ version: " + version;
    catch(NumberFormatException numberformatexception)
    loadedWithoutErrors = false;
    errorMessage = "Invalid MRJ version: " + mrjVersion;
    } else
    if(osName.startsWith("Windows"))
    if(osName.indexOf("9") != -1)
    jvm = 3;
    } else
    jvm = 2;
    } else
    jvm = -1;
    if(loadedWithoutErrors)
    loadedWithoutErrors = loadClasses();
    suck my balls

  • URL  access problem

    I have JDK1.5.0_06 (build 1.5.0_06-b05) on my PC with Windows 2000 OS and when I am running the following code
    public class A
    public static void main(String[] args)
    try{
    URL u = new URL("http://www.aaaa.com/xxxx%F3P%F3Rblabla");
    ur = u.openConnection();
    ur.getInputStream().close();
    }catch(Exception e){
    e.printStackTrace();
    }finally{
    the following exception appears:
    java.lang.IllegalArgumentException
         at sun.net.www.ParseUtil.decode(ParseUtil.java:179)
         at sun.net.www.ParseUtil.toURI(ParseUtil.java:253)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:738)
         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)%
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
    I think that the problem is using "%F3" in the URL. But, I have a site where this code appears in the URL and from IE it works fine.
    If somebody knows how to solve please give me a sign.
    If I use 1.5.0_02 (build 1.5.0_02-b09) it works fine.
    Best regards,
    Leo

    Are regular users able to access Files? Is the user seeing the SSO Login page or do they just get a HTTP 500?
    Please have the user delete all their cookies and temporary internet files and try it again.
    In addition please see if the users request makes it to the Files server by checking the HTTP access_log and the Files servlet's application.log.
    Hope that helps,
    -sancho
    I have a user who is having trouble accessing the
    administrator and files URL. He is using the same URL
    as other administrators but keeps getting HTTP 500
    error or page can not be displayed.
    The problem appears to be with his browser settings
    in IE version 5.5. He has reinstalled IE and is still
    getting this error. He can use someone else's PC and
    is able to log in using the URLs but on his PC he
    keeps getting an error.
    Does anyone have any suggestions where to start
    looking for a problem resolution?
    Thanks for any help...

  • WTK http stack implementation bug: malformed URL

    Hi
    the WTK emulators dont parse URLs correctly. The following code throws an "java.lang.IllegalArgumentException: malformed URL" exception. It works on most phones and the SonyEricsson J2ME SDK tho.
    c = (HttpConnection) Connector.open("http://www.4950.net");
    The stack trace is
    java.lang.IllegalArgumentException: malformed URL
         at com.sun.midp.io.HttpUrl.isIPv4Address(+88)
         at com.sun.midp.io.HttpUrl.parseAfterScheme(+568)
         at com.sun.midp.io.HttpUrl.<init>(+36)
         at com.sun.midp.io.j2me.http.Protocol.connect(+18)
         at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+52)
         at javax.microedition.io.Connector.openPrim(+299)
         at javax.microedition.io.Connector.open(+15)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
    I interpret the error as the http stacks recognizing this url as a numbered notation (e.g. http://123.234.34.24) instead of a text notation (e.g. http://www.google.com).
    I tried to look into the midp sources but the ones that are online do not contain the method com.sun.midp.io.HttpUrl.isIPv4Address from reading the source available it seems that the midp2.0fcs sources dont contain this error.
    Can anyone in sun fix this?

    an URL cannot start with a number after the www !

  • Dynamic URL iViews in EP70

    I need to be able to create an URL iView where by the domain and port must be dynamically set in the URL. Is there an easy way to accomplish this using EP70?

    Hello Chris,
    The error is:
    RuntimeException during appliction Java mapping com/sap/xi/tf/_mm_paymentClusterCreate_ Thrown: com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-field mapping /ns0:mt_newPaymentClusterData/merchant_name; root message: Exception:[java.lang.IllegalArgumentException: Value is too long (471/200):
    It's even in the SAP Help:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce299c3a8e5430e10000000a42189b/frameset.htm
    The length of the attribute value is defined by the XI message protocol. Values can be a maximum of 200 characters long. If, for example, you assign longer values in the mapping or adapter modules then this can lead to processing errors at runtime or the values are shortened to 200 characters. This shortening can also lead to a processing error. The processing error that occurs depends on the components that access the attributes.

  • Poblem with FXML to load image in jar using: Image url="@/myImage.png"/

    If my FXML und image files are in a JAR-file then I have the Exception:
    Caused by: java.lang.IllegalArgumentException: URL must not be empty
    at javafx.scene.image.Image.validateUrl(Image.java:966)
    at javafx.scene.image.Image.<init>(Image.java:611)
    at com.sun.javafx.fxml.builder.JavaFXImageBuilder.build(JavaFXImageBuilder.java:27)
    My FXML file:
    <Button>
    <graphic>
    <ImageView>
    <image>
    <Image url="@/images/Printer_48.png" />
    </image>
    </ImageView>
    </graphic>
    </Button>
    Is there a Problem with the JavaFXImageBuilder which can't not load Images in JAR files?

    In jars it is case-sensitive:
    <Image url="@/images/myImage.png"/>
    is not the same as
    <Image url="@/images/myImage.PNG"/>
    Edited by: 961538 on Sep 27, 2012 4:03 AM

Maybe you are looking for