Unable to load properties file from filesystem

Hi,
I have a client swing-applicatiion packaged in a jar-file. The application uses some resource files, including a xxxx.properties file to set defaults for the application. All resource files are included in the jar file and everything works as expected. I load the xxxx.properties file as follows:
is_ = getClass().getResourceAsStream("/resources/xxxx.properties");
Because it is not possibl to change any property values inside the jar-file without recreating this jar-file, i want to exclude the xxxx.properties file from the jar-file and put it in the folder containing the jar-file.
So i have:
drive:/folder/app.jar
drive:/folder/xxxx.properties
Now i read the xxxx.properties file from disk in stead of the 'resouce'-folder within my application (jar):
is_ = getClass().getResourceAsStream("drive:/folder/xxxx.propoerties");
but it doesn't work, the file isn't found.
What am i missing here?
Any suggestions?

The best way to approach this is to include the properties file in the Jar as you originally did. If the user changes any property, save the entire set of properties to a sub-directory of user.home (perhaps based on the package name of the main class). Check for the copy in user.home before using the 'default' properties built into the Jar.
Other places/ways to store the changed information.
- java.util.prefs.Preferences
- Assuming the app. has a GUI and can be deployed over a network, the JNLP API PersistenceService. Here is a demo. of the PersistenceService (http://pscode.org/jws/api.html#ps).
Edit 1:
I did not at first notice that this post was in Java Applet Development.
<li> Applets can also (theoretically) use cookies to store information. This is prone to failure when users disable cookies.
<li> To store information on the local file system (e.g. in user.home) or to use Preferences (AFAIU) would require trusted code.
<li> If the user has the Next Generation Java Plug-In (Java 1.6.0_10+) it is possible to leverage the JNLP API services in an embedded & sand-boxed applet.
Edited by: Andrew Thompson on Feb 1, 2011 9:32 AM

Similar Messages

  • UNable to locate Properties files from Servlets

    I have a Web App deployed in the default domain (domain1)that contains a servlet which needs to read in values from a .properties file from the filesystem. However, whenever I try to use it, I always end up with a FileNotFoundException.
    I tried keeping the properties file in the d:\Sun\AppServer7\bin as well as d:\Sun\AppServer7\domains\Domain1\server1\bin and still get the same exception.
    Can anyone tell me where I need to keep the .properties file? FYI, I have deployed the same on Tomcat 4.x and the same app worked perfectly (with the prop file in d:\tomcat4\bin directory).
    Thanks,
    Chetan

    Try the instance config directory. In your case, this is probably D:\Sun\AppServer7\domains\domain1\server1\config.

  • WSAD : loading properties file from EBJ project

    Hi,
    I am trying to load properties file contains database parameters into my EJB project. I am using WSAD as IDE tool
    can you please help me with following.
    1. where to place the .properties file physically ?
    2.how to load the file to my EJB/DAO classes
    3.can i use the same location to place log4j.properties file as well ?
    I have tried doing in different ways but none is working.
    thank you
    Narendra

    got it working , for information pl go to the following page and section "Using log4j in an EJB Application"
    i have followd same steps for loading my properties file .
    http://sys-con.com/story/?storyid=43413&DE=1

  • Unable to read Properties file from Java code

    Hi,
    The directory structure of my application is as follows:-
    My App
    ++++++ src
    ++++++++com
    ++++++++++readProp.java
    ++++++++resource
    ++++++++++message.properties
    I am trying to read the file as follows:-
    <code>
    public Static final string FilePath="resource.message.properties"
    Here the code to read the file. I tried using the following two techniques but to no use... :(
    File accountPropertiesFile = new File(FacesContext.getCurrentInstance()
    .getExternalContext().getRequestContextPath()
    + FilePath);
    properties.load(externalContext.getResourceAsStream(FilePath));
    </code>
    But none yeild any sucess while reading through the Bean class. please help...

    Your source code isn't there at run time, at least it shouldn't be, so the directory structure you've shown is irrelevant.
    If the file is in the corresponding position under WEB-INF/classes at runtime, the second technique should work, but you need to fix FilePath to agree with what it says under Class.getResource() and friends.

  • Unable to load pdf-files from the internet. Message shown is: Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement, then Quit and relaunch the browser. But this does not work!

    Can somebody help me with this?

    Hey Paul,
    Please try to:
    Remove from the folder /Library/Internet Plug-Ins:
    1) AdobePDFViewer.plugin
    2) AdobePDFViewerNPAPI.plugin
    backup these plugins - just in case.

  • Unable to load new information from configuration file /var/ldap/ldap_clien

    Hi all,
    When I run the command "ldapclient init", I got the error message:
    # ldapclient init -a proxyDN=cn=proxyagent,ou=profile,dc=example,dc=ca -a domainName=example.ca -a profileName=UserProfile -a proxyPassword=pwd 10.1.10.50
    Unable to load new information from configuration file '/var/ldap/ldap_client_file' ('Unable to open filename '/var/ldap/ldap_client_file' for reading (errno=2).').
    Any idea?
    Thanks a lot for your help!

    Does the profile UserProfile exist on your LDAP server?
    Do the logs on your LDAP server show access problems?
    Try using -v to get more verbose output

  • ITunes was unable to load provider data from Sync Services. Reconnect or try again later

    i just had this message for the fist time when trying to sync my iphone 4: "iTunes was unable to load provider data from Sync Services. Reconnect or try again later"
    what i did is that:
    - i unplugged my iphone 4
    - clicked on "edit" in itunes, "Preferences", "devices", "reset synck history"
    - Uninstalled itunes
    - restarted the lap top
    - reinstalled itunes
    then i tired and the iphone synced fine. i tried it a few times and it was fine.
    but i have 2 questions:
    1- could this be cause by excessive syncing, since i do sync my phone almost twice a week.
    2- is what i did good enough for a solution or do i need to rename folders and resort to the other solutions provided?

    OK
    Here's what I did:
    1. Copy all of the contents in C:\Program Files\Common Files\Apple\Apple Application Support to C:\Program Files\Common Files\Apple\Mobile Device Support folder, overwriting anything it if asked.
    2. Rright-click on the Computer icon on your desktop (or in the start menu) and select Properties. Click on Advanced System Settings. Then clik on Environment Variables. If you don't have a user variable called PATH, click New... and add it, or select it and click Edit...
    Now, add to the beginning of the user PATH the following two directories:
    c:\program files\commmon files\apple\Apple Application Support
    c:\program files\commmon files\apple\Mobile Device Support
    Be sure to put a semi-colon (;) between the two directories.
    Click OK three times to save your settings.
    Step #2 might require a reboot.
    After these 2 steps sync works again (touch wood).
    Seems that sometimes there's an additional possibility (which I didn't perform):
    If you are still having problems after following these steps, it's possible another application uses one of the same DLLs as iTunes (but a different version) and Windows is finding it in the PATH before the Apple file paths added above. You can check this by opening a DOS command prompt window and executing the following commands:
    where libxml2.dll
    where sqlite3.dll
    where libtidy.dll
    Examine the pathnames listed by these commands. If any paths are listed before the ...\Common Files\Apple\... paths, you'll want to remove those paths from the PATH environment variable.

  • How to get File Reference of a properties file from EJB

    Hi,
    I am using Sun App server 7 with Oracle 9i. I am keeping all my SQL statements in a properties file from which I am loading it while making a database operation from Stateless beans. My problem is I am not able to get the reference of the properties file. Here is the code through which I am getting the SQL statements loaded to a cache.
    String sqlFileName = "SQL.properties";
    sqlCache.load(new FileInputStream(sqlFileName));
    From the cache I am sending the SQL statement depending on the key value. But the problem is I have to keep the SQL.properties file on the App Server config directory of the instance where the server.xml file resides. Otherwise it is not able to find the properties file. But I don't want to put the properties file on the config directory of the server instance. Please help how to get the properties file from the packakge. My file is residing inside a package com.company.sql . Botht the properties file and the class accessing the file are residing in the same package. Please help how to get the reference of the file with out putting the file in the config directory.
    Thanks
    Amit Patnaik

    Just wanted to warn you of the hazards if you read a file from EJB
    So please make sure that these hazards will not affect your application. However the solution suggested to use getResourceStream() concurs with ejbSpec
    This snippet is from suns blueprint on ejb
    Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors?
    Enterprise beans aren't allowed to access files primarily because files are not transactional resources. Allowing EJBs to access files or directories in the filesystem, or to use file descriptors, would compromise component distributability, and would be a security hazard.
    Another reason is deployability. The EJB container can choose to place an enterprise bean in any JVM, on any machine in a cluster. Yet the contents of a filesystem are not part of a deployment, and are therefore outside of the EJB container's control. File systems, directories, files, and especially file descriptors tend to be machine-local resources. If an enterprise bean running in a JVM on a particular machine is using or holding an open file descriptor to a file in the filesystem, that enterprise bean cannot easily be moved from one JVM or machine to another, without losing its reference to the file.
    Furthermore, giving EJBs access to the filesystem is a security hazard, since the enterprise bean could potentially read and broadcast the contents of sensitive files, or even upload and overwrite the JVM runtime binary for malicious purposes.
    Files are not an appropriate mechanism for storing business data for use by components, because they tend to be unstructured, are not under the control of the server environment, and typically don't provide distributed transactional access or fine-grained locking. Business data is better managed using a persistence interface such as JDBC, whose implementations usually provide these benefits. Read-only data can, however, be stored in files in a deployment JAR, and accessed with the getResource() or getResourceAsStream() methods of java.lang.Class.
    Hope this info helps!

  • Unable to load any XML from JAR - Please help!!

    Hi All,
    I am a student in the final days of my degree. I have been working on my final project for some time now, an applet which converts input text to a signal plot for line encoding schemes - AMI, NRZ etc. It is pretty much finished, but one small bug threatens to scuttle the entire project! I have been searching the web all day long for answers with little success, and as the castor forum still appears to be down I am posting here. Any suggestions or advice would be greatly appreciated.
    The applet uses the castor databinding framework to load various XML data. I am using Eclipse 3.01 for development - when the program is run locally as an applet, everything works fine. When the program is bundled into a JAR file and nested into a clean folder with a html page and the jar file, when the command to read in XML is given, a NullPointerException occurs, indicating that castor was unable to access the XML files.
    Below is one of the methods used to make castor load XML data:
         public CodeSet loadCodeXML(String _codesetFilename)
              String _mappingURI = "schema/codes/codesets-mapping.xml";
              String _codesetURI = "schema/codes/" + _codesetFilename;
                    // Create a new Castor mapping object
              Mapping mapping = new Mapping();                         
            try                                                                 // Attempt to load in the selected XML character set
                 mapping.loadMapping(_mappingURI);                    // Initialize 'mapping' with the map file
                Unmarshaller unmar = new Unmarshaller(mapping); // Create a new XML Unmarshaller that uses 'mapping'
                // The line below creates a new CharSet object called _codeset and populates it with the XML data
                CodeSet _codeset = (CodeSet)unmar.unmarshal(new InputSource(new FileReader(_codesetURI)));
                // The character set was successfully loaded, so pass new CharSet object back to caller and end
                return _codeset;
            } catch (Exception e) {
                 // If an error occurs while extracting the XML data, this block will execute:
                JOptionPane.showMessageDialog(null, e);               // Display a message dialog containing the exception error
                return null;                                             // Do not return a CharSet object to caller
         }It would seem to me the problem lies within
              String _mappingURI = "schema/codes/codesets-mapping.xml";
              String _codesetURI = "schema/codes/" + _codesetFilename;I have read that files inside a JAR can be accessed in this way ( http://archive.codehaus.org/castor/user/msg00025.html ) but it won't appear to work.
    If these are set to a full system path (outside any JAR) i.e. "/home/me/proj/schema/codes/codesets-mapping.xml", the application operates fine. Clearly this is no good however, as the XML data must reside within the JAR package. I have tried many permutations such as "jar://schema/..." , "/schema/..", "schema/..", with no success. I have read of using InputStream and getResource methods to access files within the jar but have had no success. I have checked the schema dir is being put into the JAR archive.
    Could anyone suggest an appropriate way of loading XML files from within a JAR file in this context?
    Thanks in advance for any replies.

    Hi, me again..
    Re: mr_doghead - the filename of the file is passed from the calling function
    public CodeSet loadCodeXML(String _codesetFilename)eg loadCodeXML(ami.xml) will return a CodeSet object containing the ami xml data
    Anyway, I've manged to fix it up. The problem actually lies within castor, not my code at all. This is a known bug in castor that the dev's deemed 'not important' to fix, but I have to say the work around is EXTREMLY poorly documented online. Hence, this post is just to say how to fix it up if ne1 else is having trouble...
    To load mappings, use:
    mapping.loadMapping(getClass().getResource(_mappingURI).toString());where _mappingURI is a string such as "/xml/mapfile.xml"
    However, the unmarshalling method takes in a file object, so getResourceAsStream must be used:
    CharSet _charset = (CharSet)unmar.unmarshal(new InputSource(getClass().getResourceAsStream(_charsetURI)));Where CharSet is your custom object you are marshalling into, and _charsetURI is a relative path to your xml file.
    Ugly as hell? Very.
    Does it work? Perfectly.
    take it ez guys, time for me to go hand this sht in! ;D

  • ITunes was unable to load dataclass information from Sync Services-Solution

    Hello all. I recently upgraded to iTunes 9.1.1.12 on a laptop with Windows XP Pro and the latest iPhone OS (as of May 16,2010). Right after that, I started getting the "iTunes was unable to load dataclass information from Sync Services" error message. After I dismissed that window, it would go ahead and indicate that it was synching for a minute or two, and then indicate (in iTunes) that it was backing up the iPhone. This will run forever unless cancelled and the phone would not synch.
    After reading various solutions that worked for others (install Mobile Me, reinstall itunes, run diagnostics, all with numerous reboots in between), this is what worked for me:
    1) Open up Windows Services, and stop the Apple Mobile Device and iPod Service, and mark them as manual (as opposed to Automatic).
    2) Deinstall iTunes
    3) Delete the c:\program files\common files\apple folder (and all sub folders within). This is where the services are stored, and when I did all of these steps without doing this step, it didn't fix my problem. By deleting this folder, you insure that the iTunes install reinstalls these. You should see the services that were stopped in step 1, running again after the install is done. Note: I don't use Safari or QuickTime on my laptop, so I can't say whether or not this step would have any impact on those apps.
    4) Reinstall iTunes.
    5) Connect the iphone to your computer.
    6) At this point, I still got the dataclass error, so I immediately cancelled the synch.
    7) Run the diagnostics for the iphone (connectivity and synch).
    8) At this point, two DOS windows launched, and I did get another error about being able connect to the synch server.
    9) Closed the error message and disconnected the iphone (the phone at this point did not indicate that a synch was occurring).
    10) Reconnected the iphone and, voila, it's been working fine ever since.
    Hope this helps someone else out until Apple deals with the 9.1.1.12 (and .11) issues with synching.

    Either do Windows Control Panel → Administrative Tools and then picking "Services" or typing "Services.msc" in the Run command on Start menu.

  • ITunes 9.1 was unable to load dataclass information from Sync Services.

    Everything was working perfectly fine on 9.0, then i upgraded to 9.1 version and my iPod Touch 3G stopped syncing properly (error as in subject). I tried many things, checked dll's, restarted services, everything without success. SO...
    I uninstalled every single apple program and couple non applce. Deleted every Apple related file, even all those hidden in users/common files/app data folders. Double checked everything and restarted PC. THEN I downloaded full version of iTunes 9.1 64bit and installed.
    Aaaand I restarted everything, lunched iTunes, plugged iPod in. Some Apple drivers installed themselves, then iTunes was frozen for couple minutes. Finally iPod shown in iTunes. I tried to sync and... BAM. Still broken, still same error "iTunes 9.1 was unable to load dataclass information from Sync Services. Reconnect or try again later"
    Please help, my iPod is useless. Can u release new, working iTunes?

    OK i have to say, i finally fixed it. Now its fully working without ANY problems, here is what i did (before trying this u should probably do this http://support.apple.com/kb/HT1923):
    1. Unplug every external Card Reader.
    2. Unplug every Card Reader in your PC (they are plugged into motherboard)
    3. Unplug every USB Hub.
    4. Unplug every USB Drive or USB HDD.
    5. Plug in Ipod Touch/iPhone.
    6. Go to Device Manager.
    7. Search for "USB Mass Storage Device" in Universal Serial Bus Controler.
    8. Right click on it and UNINSTALL.
    9. Search for "Scan for hardware changes", click on it and wait a bit.
    10. Turn on iTunes and check if its working.
    Now it should work like a charm.

  • ITunes 10.5.3, Unable to Load Class Data from Sync Services, Crashes Repeatedly

    Ever since iTunes 10.5.3 on my Windows 7 x64 box, I've been having serious problems keeping iTunes running:
    1)  Any time I connect my iPhone or iPad, or any time they attempt to sync over WiFi, I get the 'Unable to load class data from sync services' error.  It's worth mention that the iPhone or iPad do actually then proceed to sync correctly, and all media / data is synchronized successfully, as far as I've been able to tell.  I've reset sync history, restored the iPhone and iPad, manually moved the SyncServices directory, set both the iPhone and iPad up as new, completely uninstalled iTunes and the mobile device software, re-installed, and *nothing* I do fixes this issue or even seems to impact it.  Uninstalling iTunes 10.5.3 and reinstalling iTunes 10.5.2 resolves this error.
    2)  iTunes 10.5.3 has serious crashing problems on my machine, though I've searched through forums and found a lot of other people with the problem.  In my case, sporadically as iTunes access the iTunes store (for example, I can always make it happen by subscribing to the Diggnation podcast and telling it to refresh the podcast), I get a full application crash which generates the following event in the event log:
    Faulting application name: iTunes.exe, version: 10.5.3.3, time stamp: 0x4f14cc3d
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
    Exception code: 0x80000003
    Fault offset: 0x0001280c
    Faulting process id: 0x564
    Faulting application start time: 0x01cce78789dc009a
    Faulting application path: D:\Program Files (x86)\iTunes\iTunes.exe
    Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
    Report Id: ecc77400-537a-11e1-b809-00248c196007
    Again, uninstalling iTunes 10.5.3 and re-installing iTunes 10.5.2 fixes this issue as well, but I really shouldn't have to do that.  Is there any actual solution to these problems other than dowgrading to an older version?
    Yes, I'm running current malware protection (and my system is clean) and yes, I've already checked any other obvious culprits to make sure I don't just have a corrupt library or file somewhere that's causing it.  My Windows 7 install is completely up to date from a Windows Update perspective and also from a driver perspective (even including the motherboard and chipset drivers).  I made sure to do a system file integrity check (sfc /scannow) and it confirmed my install of Windows isn't suspect, but beyond all that I was able to reproduce these failures on a completely separate machine running Windows 7 x64, without any of my media library or data on it -- iTunes 10.5.3 just seems to be bad news on Windows 7 x64 for me, even though I know there are definitely people are using it successfully.  I don't get any other application crashes for any other applications, and I've never had an issue like this with any previous version of iTunes...
    Last but not least, in case it matters, I'm running iOS 5.0.1 on both the iPhone4 and the iPad2.  The iPhone4 is the GSM AT&T model and the iPad2 is the CDMA Verizon model.

    OK, I've given up.  Uninstalled iTunes 10.5.3 permanently.  It's a shame, 10.5.2 works perfectly but 10.5.3 is a complete and total cluster for me.
    Anyone with the same problems who hasn't done this already, just uninstall iTunes and the Apple Mobile Device Service in your Add/Remove Programs, then re-install iTunes 10.5.2.  You won't lose your library or any settings or apps, it will just go back to working again.
    I wish Apple would acknowledge this so that I'd at least know it would be fixed in the future.

  • Servicegen:  unable to load type library from classloader weblogic.utils.cl

    Hi,
    I am new to weblogic. I am encountering an error on trying to run the 'servicegen' command from my ant build scripts, on weblogic 9.2.
    Please find the build.xml snapshot, and the stack trace given below.
    Please help me out with this.
    Points to be noted are:-
    1) The ejb-jar.xml specifies the bean class, which is very much present in the classpath. The ejb-jar.xml is generated by xdoclet. Snapshot is given below:-
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <description><![CDATA[No Description.]]></description>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session >
    <description><![CDATA[NorthBound Interface]]></description>
    <ejb-name>ArcorNBIService</ejb-name>
    <home>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceHome</home>
    <remote>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIService</remote>
    <local-home>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceLocalHome</local-home>
    <local>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceLocal</local>
    <ejb-class>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    2) When I replace the "ejbJar" attribute in the 'service' command with "javaClassComponents" attribute, I am able to run the servicegen command successfully. Not sure why the ejbJar is creating problems.
    3) Build.xml snapshot:-
         <target name="gen-webservice" depends="init">
              <copy todir="${work.dir}" file="${export.dir}/lib/arcor-il-service-ejb.jar"/>
              <autotype javatypes="${javatypes}" targetNamespace="${targetNamespace}" destDir="${work.dir}/classes" keepGenerated="${keepGenerated}" classpathref="webservice.client.classpath"/>
              <autotype javaComponents="com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIService" targetNamespace="com.alcatel.hdm.service.nbi.dto.holders" destDir="${work.dir}/classes" keepGenerated="true" classpathref="webservice.client.classpath"/>
              <servicegen destEar="${earfile}" warName="${warname}" contextURI="${contextURI}" keepGenerated="${keepGenerated}" classpathref="webservice.client.classpath">
                   <service ejbJar="${ejbLocation}" targetNamespace="${targetNamespace}" serviceName="${serviceName}" serviceURI="/${serviceName}" generateTypes="false" expandMethods="${expandMethods}" ignoreAuthHeader="false" protocol="https" style="rpc" useSOAP12="${useSOAP12}" typeMappingFile="${work.dir}/classes/types.xml">
                        <security enablePasswordAuth="true"/>
                   </service>
              </servicegen>
         </target>
    4) Exception stacktrace:-
    --- Nested Exception ---
    java.lang.AssertionError: java.io.IOException
    at weblogic.descriptor.DescriptorManager$DefaultMarshallerFactorySingleton.<clinit>(DescriptorManager.java:42)
    at weblogic.descriptor.DescriptorManager.getDefaultMF(DescriptorManager.java:116)
    at weblogic.descriptor.DescriptorManager.getMarshallerFactory(DescriptorManager.java:125)
    at weblogic.descriptor.DescriptorManager.getDescriptorFactory(DescriptorManager.java:153)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:277)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:309)
    at weblogic.descriptor.EditableDescriptorManager.createDescriptor(EditableDescriptorManager.java:99)
    at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:344)
    at weblogic.application.descriptor.CachingDescriptorLoader.createDescriptor(CachingDescriptorLoader.java:188)
    at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:328)
    at weblogic.application.descriptor.AbstractDescriptorLoader.getDescriptor(AbstractDescriptorLoader.java:237)
    at weblogic.application.descriptor.AbstractDescriptorLoader.getRootDescriptorBean(AbstractDescriptorLoader.java:217)
    at weblogic.ejb.spi.EjbJarDescriptor.getEjbJarBean(EjbJarDescriptor.java:141)
    at weblogic.ejb.spi.EjbJarDescriptor.getEditableEjbJarBean(EjbJarDescriptor.java:182)
    at weblogic.ejb.container.dd.xml.DDUtils.processEjbJarXMLWithSchema(DDUtils.java:519)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:182)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:126)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:154)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:147)
    at weblogic.ejb.spi.DDUtils.createDescriptorFromJarFile(DDUtils.java:30)
    at weblogic.webservice.dd.EJBJarIntrospector.<init>(EJBJarIntrospector.java:52)
    at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init>(EJBAutoTyper.java:68)
    at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:339)
    at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:313)
    at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:181)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.io.IOException
    at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:50)
    at weblogic.descriptor.DescriptorManager$DefaultMarshallerFactorySingleton.<clinit>(DescriptorManager.java:40)
    ... 37 more
    Caused by: com.bea.xml.XmlException: unable to load type library from classloader weblogic.utils.classloaders.ClasspathClassLoader@1cc0a7f f
    inder: weblogic.utils.classloaders.CodeGenClassFinder@c52200 annotation:
    at com.bea.staxb.runtime.internal.BindingContextFactoryImpl.createBindingContext(BindingContextFactoryImpl.java:50)
    at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:48)
    ... 38 more
    Total time: 5 seconds

    Hi,
    I am new to weblogic. I am encountering an error on trying to run the 'servicegen' command from my ant build scripts, on weblogic 9.2.
    Please find the build.xml snapshot, and the stack trace given below.
    Please help me out with this.
    Points to be noted are:-
    1) The ejb-jar.xml specifies the bean class, which is very much present in the classpath. The ejb-jar.xml is generated by xdoclet. Snapshot is given below:-
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <description><![CDATA[No Description.]]></description>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session >
    <description><![CDATA[NorthBound Interface]]></description>
    <ejb-name>ArcorNBIService</ejb-name>
    <home>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceHome</home>
    <remote>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIService</remote>
    <local-home>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceLocalHome</local-home>
    <local>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceLocal</local>
    <ejb-class>com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIServiceBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    2) When I replace the "ejbJar" attribute in the 'service' command with "javaClassComponents" attribute, I am able to run the servicegen command successfully. Not sure why the ejbJar is creating problems.
    3) Build.xml snapshot:-
         <target name="gen-webservice" depends="init">
              <copy todir="${work.dir}" file="${export.dir}/lib/arcor-il-service-ejb.jar"/>
              <autotype javatypes="${javatypes}" targetNamespace="${targetNamespace}" destDir="${work.dir}/classes" keepGenerated="${keepGenerated}" classpathref="webservice.client.classpath"/>
              <autotype javaComponents="com.alcatel.hdm.arcoril.webservice.ejb.ArcorNBIService" targetNamespace="com.alcatel.hdm.service.nbi.dto.holders" destDir="${work.dir}/classes" keepGenerated="true" classpathref="webservice.client.classpath"/>
              <servicegen destEar="${earfile}" warName="${warname}" contextURI="${contextURI}" keepGenerated="${keepGenerated}" classpathref="webservice.client.classpath">
                   <service ejbJar="${ejbLocation}" targetNamespace="${targetNamespace}" serviceName="${serviceName}" serviceURI="/${serviceName}" generateTypes="false" expandMethods="${expandMethods}" ignoreAuthHeader="false" protocol="https" style="rpc" useSOAP12="${useSOAP12}" typeMappingFile="${work.dir}/classes/types.xml">
                        <security enablePasswordAuth="true"/>
                   </service>
              </servicegen>
         </target>
    4) Exception stacktrace:-
    --- Nested Exception ---
    java.lang.AssertionError: java.io.IOException
    at weblogic.descriptor.DescriptorManager$DefaultMarshallerFactorySingleton.<clinit>(DescriptorManager.java:42)
    at weblogic.descriptor.DescriptorManager.getDefaultMF(DescriptorManager.java:116)
    at weblogic.descriptor.DescriptorManager.getMarshallerFactory(DescriptorManager.java:125)
    at weblogic.descriptor.DescriptorManager.getDescriptorFactory(DescriptorManager.java:153)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:277)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:309)
    at weblogic.descriptor.EditableDescriptorManager.createDescriptor(EditableDescriptorManager.java:99)
    at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:344)
    at weblogic.application.descriptor.CachingDescriptorLoader.createDescriptor(CachingDescriptorLoader.java:188)
    at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:328)
    at weblogic.application.descriptor.AbstractDescriptorLoader.getDescriptor(AbstractDescriptorLoader.java:237)
    at weblogic.application.descriptor.AbstractDescriptorLoader.getRootDescriptorBean(AbstractDescriptorLoader.java:217)
    at weblogic.ejb.spi.EjbJarDescriptor.getEjbJarBean(EjbJarDescriptor.java:141)
    at weblogic.ejb.spi.EjbJarDescriptor.getEditableEjbJarBean(EjbJarDescriptor.java:182)
    at weblogic.ejb.container.dd.xml.DDUtils.processEjbJarXMLWithSchema(DDUtils.java:519)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:182)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:126)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:154)
    at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:147)
    at weblogic.ejb.spi.DDUtils.createDescriptorFromJarFile(DDUtils.java:30)
    at weblogic.webservice.dd.EJBJarIntrospector.<init>(EJBJarIntrospector.java:52)
    at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init>(EJBAutoTyper.java:68)
    at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:339)
    at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:313)
    at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:181)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.io.IOException
    at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:50)
    at weblogic.descriptor.DescriptorManager$DefaultMarshallerFactorySingleton.<clinit>(DescriptorManager.java:40)
    ... 37 more
    Caused by: com.bea.xml.XmlException: unable to load type library from classloader weblogic.utils.classloaders.ClasspathClassLoader@1cc0a7f f
    inder: weblogic.utils.classloaders.CodeGenClassFinder@c52200 annotation:
    at com.bea.staxb.runtime.internal.BindingContextFactoryImpl.createBindingContext(BindingContextFactoryImpl.java:50)
    at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:48)
    ... 38 more
    Total time: 5 seconds

  • "Unable to load workflow actions from server. Please contact your server."

    I get the following error message when I want to create or open a workflow in SharePoint Designer 2007
    "unable to load workflow actions from server. Please contact your server
    administrator."
    I don't receive this error as a site collection administrator, but one of my contributors gets the error.

    What Chris mentioned is kind of abnormal situation described in
    http://office.microsoft.com/en-us/sharepointdesigner/HA102379121033.aspx#20.
    However, normally, you won’t be able to create SPD workflow if you only have Contribute permission level. I give the user Design permission level then he can
    create SPD workflow.
    There are other factors affecting permission to create SPD workflow:
    1.     
    According to
    http://office.microsoft.com/en-us/sharepointdesigner/HA101005871033.aspx#4
    , the SPD workflows are stored in a site-level hidden document library called Workflows. You should make sure that user have permission in this document library so that the created workflow can be saved successfully.
     http://blogs.msdn.com/sharepointdesigner/archive/2008/11/25/locking-down-sharepoint-designer.aspx
    describe the method to manage permission for this hidden Workflows document library: open the site in SharePoint Designer >> right-click the Workflows library >> click Properties >> click the Security tab >> click the link “Manage
    permissions using the browser”
    2.     
    SharePoint Designer contributor setting (http://office.microsoft.com/en-us/sharepointdesigner/HA101174691033.aspx
    ) can also block the user from being able to create workflows.

  • Itunes was unable to load provider data from sync services. Reconnect or try later

    Hi everyone
    This issue has got me stumped.
    I have a Dell Vostro desktop computer with Windows 7 SP1 64 bit edition.
    I used to be able to sync now I cannot bakup or sync.
    The device is an iphone 4s with the latest software IOS 5.1.
    Itunes is version 10.6.0.40, the latest.
    To try to fix this problem I removed itunes/quick time completely. Removed Bonjour, Apple Application Support, Apple Mobile Device Support, Apple Software Update,
    Deleted the itunes and quick time folders, the common file folders and files, deleted anything related to able under appdata local and roaming, removed apple folder under program data, scanned through registry and removed all apple entries.
    Then I rebooted the computer, re-installed itunes/quicktime and have the same error appear again.
    I have gone through this process at least 5 times , but still keep getting the same error, cannot go past it.
    I found a solution on this forum but it only applies to MACOS, could not find anything suitable for windows 7 environment.
    Also searche the web high and low and tried several different advice from people.
    This has to be a bug with Itunes! I would like to hear from Apple developers and programmers why I have to suffer so much to sync my device.
    As a last resort I am planning to rebuild windows 7 from scratch but is is a big job.
    Tried also to disable firewall, antivirus, check the apple windows services are running, nothing works to get me past this error.
    Please help someone!
    Thanks and regards
    Alfred

    Did you have a look ath this (rather) long thread about it?
    https://discussions.apple.com/message/17214161#17214161 , for example:
    danielfromkongsvinger
    Re: Unable to load provider data from Sync Services 
    16.12.2011 20:21 (in response to wisniak)
    "I then followed a tip found in PCWorld  and performed the following:
    1. Make sure iTunes isn't running.
    2. Click Start, type regedit, then press Enter.
    3. Navigate to this Registry location: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
    4. Look in the main pane for a key that refers to iTunes. If you find one, delete it, then exit the Registry.
    5. Start iTunes. The offending message should be gone!"
    This actually worked for me! I have struggeled with this error for years, and now it's gone. Thanks!

Maybe you are looking for