Implementing UIApplicationDelegate protocol methods in NSObject class not working.

Hi Everyone,
I am new bee in iphone developement. I want to implement UIApplicationDelegate protocol methods in one of my NSObject class, how can i implement that help me please.
I have mentioned the sample code what acutal i want to impelment.
.h file
@interface SmaplClass : NSObject <UIApplicationDelegate>
.m file
- (void)applicationWillResignActive:(UIApplication *)application
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
- (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
Want to implement the above methods is NSObject class to be implemented or used, its not working. Help me can do it.
Please help me
Thanks,

I complete the above discussion with saying that it is better to implement the notification handling methods in your app delegate. If there are good reasons to not to do so, you have to implement the methods in another class, instantiate the class, and call the methods from the actual UIApplicationDelegate protocol methods in the AppDelegate object. This way you can remove the actual notification handling code from AppDelegate class.
For example, suppose you implemented the methods in the class called Test. This is a sample code in the AppDelegate class:
@implementation AppDelegate
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
      Test *t = [[Test alloc] init];
     [t application: application didReceiveRemoteNotification: userInfo];
@end
Or you can create an association relationship between the AppDelegate and Test, so you do not have to create a new Test instance in each of the remote notification handling methods:
@interface AppDelegate {
     Test *test;
@end
@implementation AppDelegate
+ (id)init {
     if (self = [super init]) {
          test = [[Test alloc] init];
     return self;
- (void)dealloc {
     [test release];
     [super dealloc];
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
     // No need to create a Test instance. You just forward the call from AppDelegate instance to test      // instance
     [test application: application didReceiveRemoteNotification: userInfo];
@end

Similar Messages

  • My ipod cclassic 80gb is hang after trying dat press and hold method then also its not working please tell me solution

    My ipod cclassic 80gb is hang after trying dat press and hold method then also its not working please tell me solution

    Thanks for your response and good luck wishes, I suspect I will need them!
    In principle, I agree re: the manufacturer's warranty. However, I am pretty upset that this is now my second iPod to develop a critical fault within weeks of the warranty expiring, and frankly, it is not unreasonable to expect a state-of-the-art $500 electronic device to last well beyond one year of life.
    I agree talking to Apple is not likely to do me any good (the clue is in how impossible they make it to talk to them in the first place) - but that is not necessarily OK. I expect I will have to pay money to get the battery replaced - again, not OK (full stop - but especially given the cost of the device and the money I have spent with Apple). Yes, the batteries have a limited lifespan, but it should last longer than this (and surely, I should notice a gradual decline in its functionality, not an instant stop).
    I will try Deggie's suggestion (see my reply post), but probably won't hold my breath (think I have already done this). I probably will have to get the new battery - and probably under my own steam. It is a principle at stake and I feel I should be able to let Apple know how I'm feeling - and am frustrated that they make this virtually impossible. It sends the very clear message that they are not interested in listening to their customers.

  • HT4623 I have tried to update my iPhone using the iTunes method but it will not work. The message "The iTunes update server could not be contacted. Please check your internet connection or try again later," appears. What do I do? The Internet is working f

    I have tried to update my iPhone using the iTunes method but it will not work. The message "The iTunes update server could not be contacted. Please check your internet connection or try again later," appears. What do I do? The Internet is working fine.

    Have you tried the following troubleshooting document?
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    If you end up using the If the iTunes Store opens successfully section of the document, and the "Automatically detect settings" checkbox is already checked, try unchecking and rechecking it and clicking OK.

  • Custom worklist decorator class not working

    hi , i was trying out the worklist customization as described in http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/workspace_customization/index.html. however it is not working. any ideas as to what might be wrong...
    my custom mworklist decorator class is almost the same as that described in the example -
    package customization;*
    import fuego.lang.Interval;*
    import fuego.lang.Time;*
    import fuego.papi.InstanceInfo;*
    import fuego.papi.Presentation;*
    import fuego.papi.VarDefinition;*
    import fuego.workspace.model.view.WorkListDecorator;*
    import java.util.Locale;*
    public class CustomWorkListDecorator*
    +implements WorkListDecorator {+*
    +public String getRowStyle(String viewId, InstanceInfo instanceInfo, int rowIndex) {+*
    return  "background-color:Red" ;*
    +}+
    public String getCellStyle(String viewId, InstanceInfo instanceInfo,*
    +Presentation.Column column, int rowIndex) {+*
    return null;*
    +}+
    public String getValue(String viewId, InstanceInfo instanceInfo, Presentation.Column column,*
    +Locale locale, String currentValue, int rowIndex) {+*
    String result = currentValue;*
    +if (column.getId().equals(VarDefinition.RECEIVED_ID)) {+*
    Time receptionTime = instanceInfo.getReceptionTime();*
    Time today = Time.now();*
    +if (receptionTime.getDate().equals(today.getDate())) {+*
    Interval relativeTime = Time.sub(today, receptionTime);*
    int relativeHours = relativeTime.getHoursOnly();*
    int relativeMinutes = relativeTime.getMinutesOnly();*
    String relativeTimeString = relativeHours > 0 ? relativeHours " h " + relativeMinutes + " m" :+*
    relativeMinutes " m";+*
    result = "<table><tr><td nowrap class=bpmWorkspaceNormalText>" +*
    +"<img src='/workspace/img/time.gif'/> Today " ++
    +"(" + relativeTimeString + " ago)</td></tr></table>";+
    +}+
    +}+
    return result;*
    +}+
    +}+

    my workspace.prop file content--\
    +#+
    +#+
    +#+
    +#--------------------+
    +# Directory Settings+
    +#--------------------+
    +# The directory ID that identifies the directory ALBPM WorkSpace connects to.+
    fuego.workspace.DIRECTORY_ID=default
    +# Specifies a remote location for the directory configuration file.+
    +#remote.config.url=http://forums/remoteConfig/directory.xml+
    +# The PRESET ID WorkSpace uses to authenticate against the servlet container.+
    fuego.workspace.container-auth.directory.preset=container-auth
    +#--------------------+
    +# WorkSpace Settings+
    +#--------------------+
    +# Not used in this version.+
    fuego.workspace.autoRefreshMenuOption=false
    +# Not used in this version.+
    fuego.workspace.refreshTimeMin=1
    +# Enables debug mode.+
    fuego.workspace.debug=false
    +# WorkSpace HTTP debugger port.+
    fuego.workspace.debuggerPort=9007
    +# WorkSpace bean helper. This class should implement the interface fuego.workspace.adapter.WorkspaceBeanHelper.+
    fuego.workspace.bean.helper.className=fuego.workspace.adapter.DefaultWorkspaceBeanHelper
    +# Enables Cookie Persistence for panel preferences+
    +# (Only supported for view selections)+
    fuego.workspace.cookie.persistence.enabled=false
    +# Specifies the timeout period in seconds, between client requests.+
    +# If not specified the default value is 45 minutes.+
    +#fuego.workspace.sessionTimeOut=2700+
    +#---------+
    +# Logging+
    +#---------+
    +# Specifies the level of detail of the information stored in the ALBPM logs.+
    fuego.log.workspace.severities=fatal,severe,warning,info,debug
    +# The detail level filters messages that correspond to the same severity. It can vary from 1 to 10.+
    +# The default detail level is 5.+
    fuego.log.workspace.detailLevel=10
    +# The location where the log files are stored.+
    fuego.log.workspace.file=E:/oracle_bpm/log/workspace.log
    +# Defines the format of the information of the first line of a log entry.+
    +fuego.log.workspace.format='[<{SEV}> 'MMdd HH:mm:ss.SSS'] {MOD} ({THR}): {INDENT}{MSG}'+
    +# Defines the format of the information of the lines that follow the first line in a log entry.+
    +fuego.log.workspace.continuationFormat='[     (cont)     ] {MOD}: {INDENT}{MSG}'+
    +# Enables OpenLog (PTSpy remote debugging)+
    fuego.workspace.enableOpenLog=true
    +#------------------------------+
    +# Process Execution Properties+
    +#------------------------------+
    +# If the current activity has the autocomplete property set to true, execute the next activity if the current user has+
    +# the required role to do so.+
    fuego.workspace.execution.performNextActivity=false
    +# Waiting time for Automatic activities in a screenflow in milliseconds. If an activity exceeds this time, the+
    +# screenflow is aborted.+
    fuego.workspace.execution.waitForAutomatics=3000
    +# Display external activities in a pop up window.+
    fuego.workspace.execution.external.newWindow=
    +#-----------------------+
    +# Process API Settings+
    +#-----------------------+
    +# Number of instances in PAPI cache.+
    +# If not defined the default value is 200.+
    fuego.workspace.papi.instancesCacheSize=10000
    +# Maximum number of participants that the API will return when performing a single query.+
    +# If not defined the default value is 500.+
    fuego.workspace.papi.maxParticipants=500
    +#----------------+
    +# Single Sign On+
    +#----------------+
    +# Enables Single Sign On (SSO).+
    fuego.workspace.enableSSO=false
    +# Custom SSO class full name. This class must implement fuego.workspace.security.SSOWorkspaceLoginInterface.+
    fuego.workspace.SSO.loginClassName=fuego.workspace.security.SSOWorkspaceLogin
    +#-------------------------+
    +# WorkSpace Customization+
    +#-------------------------+
    +# CSS file that defines ALBPM WorkSpace style.+
    fuego.workspace.stylesheet=bpmworkspace.css
    +# Image bundle file.+
    fuego.workspace.imageBundleFile=ImagesBundleSet1
    +# JSP bundle file.+
    fuego.workspace.jspBundleFile=JSPBundle
    +# Help bundle file.+
    fuego.workspace.helpBundleFile=HelpBundle
    +# Custom messages bundle file.+
    +#fuego.workspace.customMessageBundle=MyMessageBundle+
    +# Enables WorkSpace edition mode.+
    fuego.workspace.enableEditMode=true
    +# Enables WorkSpace listeners configuration.+
    fuego.workspace.enableConfigurableListenerMode=true
    +# Enables WorkSpace layout edition.+
    fuego.workspace.enableLayoutEdition=true
    +# Custom Work List Panel Decorator.+
    fuego.workspace.worklist.styleResolverClassname=customization.WorkListDecoratorImpl
    +# Custom Work List Bulk Operations.+
    +#fuego.workspace.worklist.customOperationClassname=fuego.workspace.example.MyWorkListCustomOperations+
    +# Length of the description and filename column in the Attachments table, in characters.+
    fuego.workspace.attachments.contentLength=12
    +# Theme used to display process images and activity icons.+
    +# Available values: Classic, BPMN, ColorBPMN, BusinessAnalyst and UML+
    fuego.workspace.processImageTheme=ColorBPMN
    +# Default execution type for Applications and Work List panels.+
    +# Possible values: DIALOG, POPUP+
    fuego.workspace.defaultExecutionType=DIALOG
    +# Specifies if execution dialogs are displayed maximized.+
    +# If set to false, it uses the defined width and height.+
    fuego.workspace.executionDialog.maximize=false
    +# Execution dialog width.+
    fuego.workspace.executionDialog.width=500
    +# Execution dialog height+
    fuego.workspace.executionDialog.height=600
    +# Execution popup width.+
    fuego.workspace.popupWindows.width=800
    +# Execution popup height.+
    fuego.workspace.popupWindows.height=600
    +# Defines the WorkSpace search scope policy.+
    +# Possible values: ALL, ALL_IN_ROLE, PARTICIPANT_ROLES, PARTICIPANT+
    +# Multiple policies should be separated with commas. The first value is WorkSpace default selection.+
    +# If not defined WorkSpace uses ALL policy.+
    +#fuego.workspace.search.rolePolicyScopes=ALL,ALL_IN_ROLE,PARTICIPANT_ROLES,PARTICIPANT+
    +# Enables AJAX execution for interactive components.+
    fuego.workspace.execution.ajax.enabled=true
    +# Enables Views edition.+
    fuego.workspace.views.editable = true
    +# Orientation of the audit trail process image.+
    +# Possible values: auto, vertical, horizontal.+
    fuego.workspace.auditTrail.processImageOrientation=auto
    +# Show bookmarks column+
    fuego.workspace.showBookmarksColumn=true
    +# Filters case sensitive property default value.+
    fuego.workspace.filter.caseSensitive=false
    +#-----------------------+
    +# RSS Feeds Application+
    +#-----------------------+
    +# Enables Feeds link in WorkSpace.+
    fuego.workspace.feedLinkEnabled = true
    +# Enables URL guessing for the RSS Feeds application.+
    fuego.workspace.feedUrlGuessing = true
    +# RSS feed URL. If guessing is not enabled this URL is used.+
    fuego.workspace.feedUrl=http://localhost:8080/feeds/
    +#------------------------------+
    +# WorkSpace Extension Settings+
    +#------------------------------+
    +#ALBPM WorkSpace Extension wizard uses the following properties to store configuration properties.+
    +# YOU MUST NOT MODIFY THEM MANUALLY.+
    fuego.workspace.imageServer=
    fuego.workspace.enableWE=false
    fuego.workslace.collaboration.supportedLanguages=af, sq, ar, eu, be, bn, bg, ca, zh_CN, zh_TW, kw, hr, cs, da, nl, en, eo, et, fo, fi, fr, gl, de, el, he, hi, hu, is, id, ga, it, ja, kl, ko, lv, lt, mk, mt, gv, mr, nb, nn, fa, pl, pt, ro, ru, sr, sk, sl, es, sw, sv, ta, te, th, tr, uk, vi
    +# DO NOT REMOVE THIS LAST LINE+

  • prefer-application-packages and prefer-web-inf-classes not working

    Hi,
    I'm upgrading to Weblogic 10.3.2 an application that was running quite fine in Weblogic 8. But I don't manage to get it working in WL 10. I'm getting a Class Not Found error (javax/xml/stream/XMLStreamWriter) but that class is in one of the jar files of my application: "<war-file>/WEB-INF/lib"
    It seems a class loading problem but I'm using both <prefer-application-packages> and <prefer-web-inf-classes> and it's still not working. This is my weblogic-application.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application>
    <prefer-application-packages>
    <package-name>javax.xml.stream.*</package-name>
    </prefer-application-packages>
    </weblogic-application>
    I'm deploying using an ear file wich contains a war file.
    Logs:
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamWriter
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
         at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
         at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
         at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
         ... 57 more
    Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamWriter
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:344)
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:301)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:42)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:112)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         ... 70 more
    Caused by: java.lang.ClassNotFoundException: javax.xml.stream.XMLStreamWriter

    Hi!
    We have the jar xbean-2.2.0.jar in APP-INF/lib. That one contains the class javax.xml.namespace.NameSpaceContext. I saw that the same class was in another jar as well. I've removed it from the second jar and now it's only in the xbean-2.2.0.jar. But I still get the same error. Maybe there is something wrong in my application.xml? I have all the jars in APP-INF/lib and in <war-file>/WEB-INF/lib
    Application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
    <application id="Application_ID">
    <display-name>RaadgiverPM</display-name>
    <module>
    <web>
    <web-uri>rpm.war</web-uri>
    <context-root>/raadgiverPM</context-root>
    </web>
    </module>
    <library-directory>lib</library-directory>     
    </application>
    2010-09-06 11:05:07,856 735360 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient - [DELFI] Failed to initialize client at http://172.16.10.113:8090/mockRpmGrpMemberRltnpLSvo_Binding?wsdl
    java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
         at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
         at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
         at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.newInstance(DynamicClientFactory.java:132)
         at groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:198)
         at groovyx.net.ws.WSClient.initialize(WSClient.java:107)
         at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.initializeClient(DRWebServiceClient.groovy:47)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient$initializeClient$0.callCurrent(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.initializeClient(DRWebServiceClient.groovy:37)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient$initializeClient.callCurrent(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.<init>(DRWebServiceClient.groovy:33)
         at no.delfidata.dr.wsclients.drwsclients.GenericWebServiceClient.<init>(GenericWebServiceClient.groovy:12)
         at no.delfidata.dr.drintstd.channel.GenericWSClientManager.getClient(GenericWSClientManager.java:28)
         at no.delfidata.dr.drintstd.channel.impl.WSChannelImpl.getData(WSChannelImpl.java:46)
         at no.delfidata.dr.drintstd.integrationadapter.impl.AdapterWSImportRpmGrpMemberRltnpLSvo.getDataFromChannel(AdapterWSImportRpmGrpMemberRltnpLSvo.java:74)
         at no.delfidata.dr.drintstd.integrationadapter.AbstractIntegrationAdapter.getDataImportFromChannel(AbstractIntegrationAdapter.java:232)
         at no.delfidata.dr.drintstd.integrationadapter.AbstractIntegrationAdapter.getData(AbstractIntegrationAdapter.java:173)
         at no.delfidata.dr.drintstd.integrationengine.impl.IntegrationEngineImpl.importData(IntegrationEngineImpl.java:113)
         at no.delfidata.dr.drsvcstd.integration.impl.IntegrationServiceImpl.importCustomerData(IntegrationServiceImpl.java:117)
         at no.delfidata.dr.drsvcstd.integration.impl.StartUpService.openAndImportCustomer(StartUpService.java:81)
         at no.delfidata.dr.drstdgui.gui.control.ReceivingServletAction.execute(ReceivingServletAction.java:135)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at no.delfidata.dr.drbasis.gui.filter.MenuFilter.doFilter(MenuFilter.java:78)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at no.delfidata.common.gui.filter.SecurityFilter.doFilter(SecurityFilter.java:265)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation
    in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>)
    for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
         at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
         at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
         at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
         ... 48 more
    Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:112)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         ... 61 more

  • XSLT Mapping with Java class not working in Integration Repository

    Hi,
    I have an XSLT mapping program with Java enhancement and I was able to successfully tested it in Stylus Studio. However, when I imported the Java class and the xslt program in Enterprise Service Builder and tested it, my program does not compile.
    Here is the error message: "Transformer Configuration Exception occurred when loading XSLT mapping_temp.xsl; details: Could not compile stylesheet".
    My java program is in a zip file containing SOAPHeaderHandler.java and SOAPHeaderhandler.class. My Java has a package com.nga.xslt.
    Here is the declaration of my Java class in the XSLT: xmlns:javamap="java:com.nga.xslt.SOAPHeaderHandler"
    It seems that it could not read the java class. Can you please advice what is wrong?

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Document Class not work when I shift my MovieClip to 2nd Frame.

    Hello,
    All my content is at 1st frame of my FLA file...and I'm using Document Class... When I try to shift my content to 2nd frame, so I can use 1st frame for preloader.. but its not working...
    This is my document class... Basically at 1st frame I'm loading external jpg image to a MovieClip..
    Is it possible, I can **** my MovieClip and other content to 2nd frame of the timeline... ??? and Document Class work???
    Thanks...
    package com.ahmad.bg
         //import all classes
         import caurina.transitions.Tweener;
         import flash.display.Loader;
         import flash.display.MovieClip;
         import flash.display.Sprite;
         import flash.display.StageAlign;
         import flash.display.StageDisplayState;
         import flash.display.StageScaleMode;
         import flash.events.Event;
         import flash.events.MouseEvent;
         import flash.net.URLRequest;
         public class MainClass extends MovieClip
              //create variables
              private var loader:Loader;
              private static const IMAGE_PATH:String = "bgs/bg.jpg";         
              public function MainClass() {
                   stage.align = StageAlign.TOP_LEFT;
                   stage.scaleMode = StageScaleMode.NO_SCALE;              
                   stage.addEventListener(Event.RESIZE, stageResize);         
                   //load external image
                   loader = new Loader();
                   loader.load(new URLRequest(IMAGE_PATH));
                   loader.contentLoaderInfo.addEventListener(Event.COMPLETE, showImage);
                   pic.addChild(loader);    
              private function showImage(e:Event):void
                   try {                             
                        e.target.content.alpha = 1;
                        Tweener.addTween(e.target.content, { alpha:1, time:1, transition:"easeOutSine" } );                   
                        e.target.content.smoothing = true;                             
                   } catch (e:Error) { };
                   stageResize();
              private function stageResize(e:Event=null):void
                   pic.x = 0;
                   pic.y = 0;
                   pic.scaleX = pic.scaleY = 1;              
                   if ((stage.stageHeight / stage.stageWidth) < pic.height / pic.width) {
                        pic.width = stage.stageWidth;
                        pic.scaleY = pic.scaleX;
                   } else {
                        pic.height = stage.stageHeight;                   
                        pic.scaleX = pic.scaleY;
                   pic.x = stage.stageWidth / 2 - pic.width / 2;
                   pic.y = stage.stageHeight / 2 - pic.height / 2;         
                   bottomNav.x = Math.floor(stage.stageWidth / 2 - bottomNav.width / 2);
                   bottomNav.y = Math.floor(stage.stageHeight - bottomNav.height - 0);

    If you have code in your main class that references specific movieclips on the stage, they have to be on every frame you plan on using.
    If you have a movieclip named "pic" on frame 2, but you are referencing it right away in the main class, which starts on frame 1, then it is looking for a movieclip that does not exist until you move it to frame 2

  • Trying to implement variable into a string...not working

    Hey guys,
    I am fiddling with a Cocoa app of mine, and for some really odd reason this is not working. I cannot find a solution, but maybe you will be able to pinpoint what is going on.
    NSString * studentReply;
    studentReply = @"%@ says okay.", studentsName;
    All it returns in Interface Builder is - "%@ says okay."
    I'd appreciate any help you can offer.
    Ricky.

    You weren't calling a formatting method.
    Besides separating arguments, a comma can also separate statements, so what your code was essentially saying to the computer was:
    First do: studentReply = @"%@ says okay." and then do: studentsName The first statement is a simple assignment (which is why you are seeing "%@ says okay." as the output). The second statement doesn't really do anything (just tells the computer to "evaluate" the variable) but it won't complain.
    Hope that helps.

  • Drop java class not working

    Hello,
    i'm using a freshly installed SQLDeveloper 1.5.1 to a java class to the database. Loading the class works, i can see my class in the tree under java.
    Now i wanted to change the source code of my class, so i wanted to drop it in the database. But although SQLDeveloper tells me that the Java Object "MyClass" has been dropped, it is still there in the tree. When i click on the entry in the tree i can still see the code.
    What do i need to do to remove my java code from the database?
    Thanks for help in advance,
    Dirk

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Hover psudeo-class not working

    I'm in the beginning stages of a small site and have tried to copy some styles from another site that is working. The menu effects should work like they do here:
    http://www.aptcoweb.com/dev/SEF-PC/index.htm
    They are not working here:
    http://www.aptcoweb.com/dev/vip/index2.htm
    I admit to being a novice. Where have I slipped up?

    Actually, your nav has no #Menu id assigned to it.  That's why your #Menu styles are not working.  Change your HTML code to this:
    <nav id="Menu" class="fluid TopNav">
    <ul class="fluid fluidList Menu">
       <li class="fluid MenuItem"><strong><a href="/dev/vip/index2.htm">Home</a></strong></li>
       <li class="fluid MenuItem"><strong><a href="/dev/vip/gallery.htm">Staff &amp; Photos</a></strong></li>
       <li class="fluid MenuItem"><strong><a href="/dev/vip/testimonials.htm">Testimonials</a></strong></li>
       <li class="fluid MenuItem"><strong><a href="/dev/vip/reservations.htm">Rates &amp; Reservations</a></strong></li>    </ul>
      </nav>
    Also remove the closing </nav> tag after your </article>  tag. 
    Navigation doesn't belong in your <article> as they mean different things.
    I'm not sure you need all those extra classes, either.  Less code is better code to work with.
    Nancy O.

  • Inherited methods of super class not shown in outline

    Hello, is there a possibility to display the methods and variables from the super class in the outline of the inheriting class in AiE?

    Hi Christian,
    We had discussed this, when we implemented the outline and quick outline some years, ago. Finally, we sticked to the approach that is used by other plug-ins in Eclipse (like JDT).
    There Outline View shows only the content of the current editor. This helps to keep the content of the view stable when you select an element for navigation (because you won't be able to switch the editor by selecting an element ).
    Inherited members are usually part of other editors, unless you have redefined a method in your current class. Therefore, they are not shown in Outline View (unless they are redefinitions).
    The filters like "Hide Non-Public Members of classes" can only hide elements of the current editor.
    Inherited members can be shown in the Quick Outline, because the interaction pattern is different there: If you navigate to an element the pop-up is closed. Therefore, a content change of the Quick-Outline does not hurt.
    Michael

  • JDeveloper 10g, ADF Faces & BC: setVar method on CoreTable is not working

    Hi all,
    I am in the process of creating a custom tag library for our organization. I seem to be having problems with the setVar method on the CoreTable component. I created a simple reproducible example using the scott/tiger schema. Within my tabletest.jsp, I have a af:table which was created via dragging from the datacontrol pallet. Next, I add my custom tag and set the same value attribute. When I run the page, #{row.Deptno} does not evaluate to anything! However, I know that the value is set properly due to the same number of rows appearing within my custom table tag.
    Suggestions are appreciated.
    thanks,
    Wes
    Here is the screen shot of my example:
    http://www.flickr.com/photos/54652784@N03/5062690216
    jsp code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <%@ taglib uri="http://acme.customtag" prefix="customtag"%>
    <f:view>
    <afh:html>
    <afh:head title="tabletest">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    </afh:head>
    <afh:body>
    <af:messages/>
    <h:form>
    <af:outputText value="below is the adf table"/>
    <af:table value="#{bindings.ViewObj1.collectionModel}" var="row">
    <af:column sortProperty="Deptno" sortable="false"
    headerText="#{bindings.ViewObj1.labels.Deptno}">
    <af:outputText value="#{row.Deptno}"/>
    </af:column>
    <af:column sortProperty="Dname" sortable="false"
    headerText="#{bindings.ViewObj1.labels.Dname}">
    <af:outputText value="#{row.Dname}"/>
    </af:column>
    </af:table>
    <af:objectSpacer width="10" height="50"/>
    <af:outputText value="Below is the custom table"/>
    </h:form>
    <customtag:customtable value="#{bindings.ViewObj1.collectionModel}"
    disabled="false"/>
    </afh:body>
    </afh:html>
    </f:view>
    CustomTable.java code:
    package customtag;
    import java.io.IOException;
    import javax.faces.application.Application;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import oracle.adf.view.faces.component.core.data.CoreColumn;
    import oracle.adf.view.faces.component.core.data.CoreTable;
    import oracle.adf.view.faces.component.core.output.CoreOutputText;
    public class CustomTable extends UIComponentBase {
    public static final String COMPONENT_TYPE = "customtag.customtable";
    public static final String RENDERER_TYPE = null;
    private CoreTable table = new CoreTable();
    public CustomTable() {
    public void encodeChildren(FacesContext context) throws IOException {
    // Encode the top most component
    Application apps = context.getApplication();
    table.setVar("row");
    Object value = getAttributes().get("value");
    CoreColumn column = new CoreColumn();
    CoreOutputText cout = new CoreOutputText();
    if (value != null) {
    table.setValue(value);
    ValueBinding rowValueBinding =
    apps.createValueBinding("#{row.Deptno}");
    Object rowValue = resolveExpression("#{row.Deptno}");
    if (rowValue != null) {
    System.out.println("rowValue is reconized. " + rowValue);
    cout.setValue(rowValue);
    } else if (rowValueBinding.getValue(context) != null) {
    System.out.println("rowValueBinding is reconized." +
    rowValueBinding.getValue(context));
    cout.setValueBinding("Value", rowValueBinding);
    } else {
    System.out.println("row is not reconized.");
    cout.setValue("this is a hard coded row attribute value");
    column.getChildren().add(cout);
    table.getChildren().add(column);
    table.encodeAll(context);
    public static Object resolveExpression(String expression) {
    FacesContext ctx = FacesContext.getCurrentInstance();
    Application app = ctx.getApplication();
    ValueBinding bind = app.createValueBinding(expression);
    return bind.getValue(ctx);
    public boolean getRendersChildren() {
    return true;
    public String getFamily() {
    return COMPONENT_TYPE;
    }

    Hi,
    you don't mention a JDeveloper version. If you are not on a recent version, can you try one. If it reproduces, please provide steps required for a reproducible test case
    Frank

  • Java clients and IUserPrincipal class not working for authentication

    I'm developing a Java client which talks to EJBs on the iAS server via
    iiop.
    I've already developed EJBs, and they work fine. I'm trying to do user
    authentication per the examples in the Rich Client section.
    Here are the steps I've taken:
    1. I've created a class (achp.security.AchpPrincipal) which implements
    com.netscape.ejb.client.IUserPrincipal.
    2. I've added the class to the initial context via the following line:
    env.put("com.netscape.ejb.client.PrincipalClass",
    "achp.security.AchpPrincipal");
    3. I do a home lookup with the above initial context when the
    application starts, create a bean, and then invoke a method on the bean.
    When I do the home lookup, according to the manual, my AchpPrincipal
    class should be instantiated (which brings up a login window which then
    records username and password for future use).
    This never happens. The AchpPrincipal class is never instantiated,
    although the home lookup occurs successfully and the bean method call is
    also performed successfully.
    I'm running server on my Win2K desktop, with SP3. And, of course, I've
    properly installed the CXS server (as indicated by the fact that I can
    communicate with the EJBs at all though the Java client).
    Any help would be appreciated.
    Thanks,
    Douglas Bullard
    Multnomah County ISD

    I'm developing a Java client which talks to EJBs on the iAS server via
    iiop.
    I've already developed EJBs, and they work fine. I'm trying to do user
    authentication per the examples in the Rich Client section.
    Here are the steps I've taken:
    1. I've created a class (achp.security.AchpPrincipal) which implements
    com.netscape.ejb.client.IUserPrincipal.
    2. I've added the class to the initial context via the following line:
    env.put("com.netscape.ejb.client.PrincipalClass",
    "achp.security.AchpPrincipal");
    3. I do a home lookup with the above initial context when the
    application starts, create a bean, and then invoke a method on the bean.
    When I do the home lookup, according to the manual, my AchpPrincipal
    class should be instantiated (which brings up a login window which then
    records username and password for future use).
    This never happens. The AchpPrincipal class is never instantiated,
    although the home lookup occurs successfully and the bean method call is
    also performed successfully.
    I'm running server on my Win2K desktop, with SP3. And, of course, I've
    properly installed the CXS server (as indicated by the fact that I can
    communicate with the EJBs at all though the Java client).
    Any help would be appreciated.
    Thanks,
    Douglas Bullard
    Multnomah County ISD

  • Java Applets and multiple classes not working.

    I have tested my JApplet class alone to view its layout and to make sure it actually works. But once I add in my other classes, compile, jar, and test I get the error:
    java.lang.NoClassDefFoundError: AlakApp (wrong name: alak/codeFiles/AlakApp)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:155)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:618)
            at sun.applet.AppletPanel.createApplet(AppletPanel.java:779)
            at sun.applet.AppletPanel.runLoader(AppletPanel.java:708)
            at sun.applet.AppletPanel.run(AppletPanel.java:362)
            at java.lang.Thread.run(Thread.java:619)My Directory contains these and only these:
    F:\alak\codeFiles:
      AlakApp.java
      Game.java
      Board.java
      Space.java
      index.html
      AlakGame.jarAll my classes are in the package alak.codeFiles.
    My .html file contains this:
    <HTML>
    <HEAD>
      <TITLE>ALAK</TITLE>
    </HEAD>
    <BODY>
      <applet code="AlakApp.class" archive="AlakGame.jar" width=400 height=200>
      Please use a Java compatible browser to see this.
      </applet>
      <br>
    </BODY>
    </HTML>These are they commands I am issuing:
    F:\alak\codeFiles>javac *.java
    F:\alak\codeFiles>jar -cvf AlakGame.jar *.class
    F:\alak\codeFiles>appletviewer index.htmlI've been trying many different things to narrow down what is going on. If you need to see my code let me know, but I've tested everything with a text-based user interface and they work.
    So does anyone know the cause of this error?

    Ok i rared the test and uploaded to rapidshare.. here is the link:
    http://rapidshare.com/files/76860865/test.rar.html
    But here is the code. They are in the directory /test/files/
    ADigit.java
    package test.files;
    public class ADigit
      private int value;
      public ADigit( int val )
       this.value = val;
      public String toString()
       return "" + this.value;
    }ADigitApp.java
    package test.files;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ADigitApp extends JApplet implements ActionListener
      private ADigit numeroUno;
      private int currentNum;
      private Container container;
      private javax.swing.JLabel jLabel;
      private javax.swing.JTextArea jTextArea;
      private javax.swing.JButton jButton;
      public void init()
        currentNum = 1;
        numeroUno = new ADigit( currentNum );
         container = getContentPane();
        container.setLayout( new BorderLayout() );
         jLabel = new javax.swing.JLabel();
         jTextArea = new javax.swing.JTextArea();
         jLabel.setText( "The Number is: " );
         jTextArea.setText( numeroUno.toString() );
         jButton = new javax.swing.JButton();
         jButton.setText( "New Number" );
        jButton.addActionListener( this );
         container.add( jLabel, BorderLayout.WEST );
         container.add( jTextArea, BorderLayout.CENTER );
         container.add( jButton, BorderLayout.EAST );
        setSize( 200, 200 );
      public void actionPerformed( ActionEvent e )
        this.currentNum++;
         numeroUno = new ADigit( this.currentNum );
         jTextArea.setText( numeroUno.toString() );
    }index.html
    <HTML>
    <HEAD>
      <TITLE>NUMBERSSSS</TITLE>
    </HEAD>
    <BODY>
      <applet code="ADigitApp.class" archive="NumberFun.jar" width=200 height=200>
      Please use a Java compatible browser to see this.
      </applet>
      <br>
    </BODY>
    </HTML>Commands:
    /test/files>javac *.java
    /test/files>jar -cvf NumberFun.jar *.class
    /test/files>appletviewer index.htmlThis example produces the same style of error.

  • Inheritance class not working

    Alright, so I'm supposed to write an inheritance class called MusicStore, which is inherited from the Store ( already written), and then the MusicStore method tests out the MusicStore. The MusicStore has the additional attributes of the number of titles it offers and the its address...The store already offers the name of the store where the titles are located...I believe I'm writing it the MusicStore correctly, but I get this really odd error when I compile...I am not quite sure how it happens????? Helllpppp!!! I would appreciate it
    I will post the error and the error is located a bit lower in the MusicStore that I posted-
    "File: E:\comp 150\H10\MusicStore.java [line: 13]
    Error: E:\comp 150\H10\MusicStore.java:13: cannot find symbol
    symbol : constructor Store()
    location: class Store"
    Here is the Store:
    /* Store Class
       Anderson, Franceschi
    public class Store
      public final double SALES_TAX_RATE = 0.06;
      private String name;
      public Store( String newName )
        setName( newName );
      public String getName( )
        return this.name;
      public void setName( String newName )
        this.name = newName;
      public String toString( )
        return( "name: " + this.name );
      public boolean equals( Store otherStore )
        return ( this.name.equalsIgnoreCase( otherStore.name ) );
    }Here is the MusicStore:
    /* MusicStore class
    Smith, Tahnee
    public class MusicStore extends Store
      public final int DEFAULT_NUMBER = 0;
      private int numberOfTitles;
      public final String DEFAULT_ADDRESS = " ";
      private String address;
      public MusicStore()
      {                                         // LINE 13 : Here is where the error is...I don't understand what is going on here.
        address = DEFAULT_ADDRESS;
        numberOfTitles = DEFAULT_NUMBER;
      public MusicStore(String startNameStore, int startNumber, String startAddress)
        super( startNameStore );
        setNumberOfTitles( startNumber );
        setAddress( startAddress);
      public void setAddress( String newAddress)
        address = newAddress;
      public void setNumberOfTitles(int newNumber)
        if ( numberOfTitles > 0 )
          numberOfTitles = newNumber;
        else
          System.out.println(" Number of titles cannot be negative");
      public String toString()
        return super.toString()
          + " The number of titles are " + numberOfTitles
          + " The address is " + address;
    }Here is the MusicStoreClient:
    /* MusicStoreClient class
       Anderson, Franceschi
    public class MusicStoreClient
      public static void main( String [] args )
        MusicStore ms1 = new MusicStore( "Records, Inc.", 1000, "123 Elm Street" );
        MusicStore ms2 = new MusicStore( "All Records Unlimited", 1200, "999 Green Street" );
        System.out.println( ms1 );
        System.out.println( ms2 );
        ms2.setNumberOfTitles( 1000 );
        ms2.setAddress( "123 Elm Street" );
        if ( ms1.equals( ms2 ) )
          System.out.println( "ms1 and ms2 are equal" );
        else
          System.out.println( "ms1 and ms2 are not equal" );
        ms2.setName( "Records, Inc." );
        if ( ms1.equals( ms2 ) )
          System.out.println( "ms1 and ms2 are now equal" );
        else
          System.out.println( "ms1 and ms2 are still not equal" );
    }Edited by: guitarlady3000 on Nov 5, 2008 4:22 PM
    Edited by: guitarlady3000 on Nov 5, 2008 4:37 PM

    You don't explicitly call the super(...) constructor in your parameterless MusicStore constructor code and so Java will automatically and behind the scenes place a call to super() there. Problem is, Store doesn't have a parameterless constructor. Solution: either give Store a parameterless constructor or explicitly call super with a proper parameter.

Maybe you are looking for