The rules of Java constructors

A constructor with no parameters will automatically call super(). If I extend an object with a parametered constructor, I need to manually enter that constructor into my subclass constructor "super(a, b)".
What then of non extended objects? In this non-extended object if I make a constructor that takes parameters doesn't it automatically make calls to super(). It has to to construct an Object object no?
I haven't read anything regarding this specific behaviour. I was hoping someone could confirm or deny my suspicions.

jverd wrote:
Constructor rules:
1) Every class has at least one ctor.
1.1) If you do not define an explicit constructor for your class, the compiler provides a implicit constructor that takes no args and simply calls super().
1.2) If you do define one or more explicit constructors, regardless of whether they take args, then the compiler no longer provides the implicit no-arg ctor. In this case, you must explicitly define a public MyClass() {...} if you want one.
1.3) Constructors are not inherited.
2) The first statement in the body of any ctor is either a call to a superclass ctor super(...) or a call to another ctor of this class this(...) 2.1) If you do not explicitly put a call to super(...) or this(...) as the first statement in a ctor that you define, then the compiler implicitly inserts a call to super's no-arg ctor super() as the first call. The implicitly called ctor is always super's no-arg ctor, regardless of whether the currently running ctor takes args.
2.2) There is always exactly one call to either super(...) or this(...) in each constructor, and it is always the first call. You can't put in more than one, and if you put one in, the compiler's implicitly provided one is removed.If that would have been a question I wonder how many responds will provide the correct answer.

Similar Messages

  • Error while executing the rule session

    Hi, I am using Oracle Business Rules Engine 10.1.3.3.0.I am developing rules using XML Facts.I am using a complex type array schema and binding it to define XML facts.Earlier the depth of the schema is 1 and it worked fine,now our schema's depth is 2 and while binding this schema is also working fine.The sample structure of the present schema I am binding is
    <xsd:schema>
    <xsd:element name = 'ruleRepository' type = 'RuleRepositoryType'/>
    <xsd:complexType name='RuleRepositoryType'>
    <xsd:sequence>
    <xsd:element ='ruleFacts' type='RuleFactsType' minOccurs='0' maxOccurs='unbounded'/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name='RuleFactsType'>
    <xsd:sequence>
    <xsd:element name='fact1' type='xsd:string'/>
    <xsd:element name='fact2' type='xsd:string'/>
    <xsd:element name='fact3' type='xsd:string'/>
    <xsd:element name='fact4' type='Fact4' minOccurs='0' maxOccurs='unbounded'/>
    <xsd:sequence/>
    </xsd:complexType>
    <xsd:complexType name='Fact4'>
    <xsd:sequence>
    <xsd:element name='element1' type='xsd:string'/>
    <xsd:element name='element2' type='xsd:string'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Earlier I have binded the similar schema as above but without 'fact4'.It went well and the rules were executing fine.
    However when I am trying to bind a similar schema like the above one, its binding fine but when executing from the BPEL Process,its giving errors like,
    "Error Caching Decision Services metadata,fact3 is undefined in DM,line6,Column 12",
    Please note that I am using fact1 and fact2 only for defining the rules , I am niether using fact3 which is a simple type nor fact4 which is a complex type.
    I have asserted Package.RuleRepositoryType in the definitions of the rule author.I have tried with different combinations of assertions but no one worked.
    The above error(
    "Error Caching Decision Services metadata,fact3 is undefined in DM,line6,Column 12") is coming for the first run of the decision service only,in the next runs its giving another error,which is like
    <2008-04-10 07:52:30,772> <ERROR> <default.collaxa.cube.services> <::> ORABPEL-36333
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::>
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::> Error while executing the rule session.
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::> The rule session {0} failed to execute.
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::> Check the underlying exception and correct the error. Contact oracle support if error is not fixable.
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::>
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:251)
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.impl.DecisionServiceImpl.process(DecisionServiceImpl.java:1385)
    <2008-04-10 07:52:30,773> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.impl.DecisionServiceImpl.assertExecuteWatchStateless(DecisionServiceImpl.java:546)
    <2008-04-10 07:52:30,774> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.runtime.BookOrderDecisionSOAPBinding_Tie.invoke_assertExecuteWatchStateless(BookOrderDecisionSOAPBinding_Tie.java:162)
    <2008-04-10 07:52:30,774> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.runtime.BookOrderDecisionSOAPBinding_Tie.processingHook(BookOrderDecisionSOAPBinding_Tie.java:457)
    <2008-04-10 07:52:30,774> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
    <2008-04-10 07:52:30,774> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:413)
    <2008-04-10 07:52:30,783> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
    <2008-04-10 07:52:30,783> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:277)
    <2008-04-10 07:52:30,783> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
    <2008-04-10 07:52:30,783> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:134)
    <2008-04-10 07:52:30,783> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
    <2008-04-10 07:52:30,783> <ERROR> <default.collaxa.cube.services> <::> at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    <2008-04-10 07:52:30,784> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    <2008-04-10 07:52:30,801> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> at java.lang.Thread.run(Thread.java:595)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> Caused by: java.lang.NullPointerException
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.RuleSessionPool.getSession(RuleSessionPool.java:463)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:224)
    <2008-04-10 07:52:30,802> <ERROR> <default.collaxa.cube.services> <::> ... 26 more
    <2008-04-10 07:52:30,803> <ERROR> <oracle.bpel.services> <::>
    java.lang.NullPointerException
    at oracle.bpel.services.rules.rpi.oracle.RuleSessionPool.getSession(RuleSessionPool.java:463)
    at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:224)
    at oracle.bpel.services.rules.impl.DecisionServiceImpl.process(DecisionServiceImpl.java:1385)
    at oracle.bpel.services.rules.impl.DecisionServiceImpl.assertExecuteWatchStateless(DecisionServiceImpl.java:546)
    at oracle.bpel.services.rules.runtime.BookOrderDecisionSOAPBinding_Tie.invoke_assertExecuteWatchStateless(BookOrderDecisionSOAPBinding_Tie.java:162)
    at oracle.bpel.services.rules.runtime.BookOrderDecisionSOAPBinding_Tie.processingHook(BookOrderDecisionSOAPBinding_Tie.java:457)
    at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:413)
    at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:277)
    at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:134)
    at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    08/04/10 07:52:30 pFaultMessage is org.collaxa.thirdparty.apache.wsif.base.WSIFDefaultMessage@6e0e5f name:operationErroredFault
    08/04/10 07:52:30 QName string is operationErroredFault
    where 'BookOrderDecision' is the name of the decision service I am using in BPEL.
    I dont understand why I am getting two errors for the same BPEL Process.
    Kindly help me in this problem.I am stuck with this for about a week but could not get to the solution.
    Thanks in advance.
    Regards,
    Venkat.

    Hi Venkat,
    Whenever you do schema changes, you need to go through the cycle of
    re-importing the XML schema in the rule repository, re-create the decision
    service partnerlink, re-deploy the decision service.
    I suspect you have maybe imported the entire XML fact type model (with fact3 and
    fact4) instead of just fact1 and fact2 (might want to check in rule author).
    So even if you don't use fact3 and fact4 in decision service, they are part of the rules
    datamodel.
    Regards,
    Ralf

  • Applying p5665750_10131_GENERIC.zip doesnt solve the rules change problem

    Hi,
    Please suggest a solution to the below problem.
    Initial problem : whenever user changed rules in rules repository(WebDAV repository) they are not getting reflected in the BPEL process which contains decision service.
    Solution : redeploying the BPEL process or restarting SOA suite will affect BPEL process with the changes in rules repository.
    But we need to solve the above problem without redeploying the BPEL process. For this we have been provided a patch (p5665750_10131_GENERIC.zip)
    Installation of above patch
    %soa_home%opmn\bin>Opmnctl stopall
    Then I installed the patch.
    And restart the SOA suite
    %soa_home%opmn\bin>Opmnctl startall
    Now when I am trying to access the application I am getting Promotion Status as null and the following is the stack trace of the error
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> ORABPEL-36334
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::>
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> Error while executing a rule session unit of work.
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> The rule session DuvalRules06:390024 failed to execute a unit of work.
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> Check the underlying exception and correct the error. Contact oracle support if error is not fixable.
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::>
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:497)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.AbstractDefaultRuleSession.execute(AbstractDefaultRuleSession.java:245)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:231)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.impl.DecisionServiceImpl.process(DecisionServiceImpl.java:1385)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.impl.DecisionServiceImpl.assertExecuteWatchStateful(DecisionServiceImpl.java:719)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.invoke_assertExecuteWatchStateful(NewDecisionServiceSOAPBinding_Tie.java:60)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.processingHook(NewDecisionServiceSOAPBinding_Tie.java:451)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:413)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:277)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:134)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    <2007-04-27 18:39:14,912> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at java.lang.Thread.run(Thread.java:595)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Caused by: oracle.rules.rl.exceptions.EngineException: Internal error: Function assert-object: error in call: Jess reported an error in routine DefinstanceList.definstance
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> while executing (assert-object duvalCounty.StudentImpl@795486).
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Message: Object is not instance of duvalCounty.StudentImpl.Jess reported an error in routine DefinstanceList.definstance
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> while executing (assert-object duvalCounty.StudentImpl@795486).
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Message: Object is not instance of duvalCounty.StudentImpl.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.exceptions.ExceptionFactory.createEngineException(ExceptionFactory.java:797)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.engine.Engine.handleJessException(Engine.java:3245)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.engine.Engine.callFunction(Engine.java:382)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.RuleSession.callFunctionWithArgumentList(RuleSession.java:404)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.RuleSession.callFunctionWithArgument(RuleSession.java:328)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:368)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> ... 28 more
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Caused by: Jess reported an error in routine DefinstanceList.definstance
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> while executing (assert-object duvalCounty.StudentImpl@795486).
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Message: Object is not instance of duvalCounty.StudentImpl.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.DefinstanceList.assertObject(DefinstanceList.java:564)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.Rete.assertObject(Rete.java:1554)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.AssertObject.call(ReflectFunctions.java:1554)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.FunctionHolder.call(FunctionHolder.java:30)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.Funcall.execute(Funcall.java:280)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.engine.Engine.callFunction(Engine.java:360)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> ... 31 more
    <2007-04-27 18:39:14,928> <ERROR> <oracle.bpel.services> <::> Internal error: Function assert-object: error in call: Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.
    oracle.rules.rl.exceptions.EngineException: Internal error: Function assert-object: error in call: Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.
    at oracle.rules.rl.exceptions.ExceptionFactory.createEngineException(ExceptionFactory.java:797)
    at oracle.rules.rl.engine.Engine.handleJessException(Engine.java:3245)
    at oracle.rules.rl.engine.Engine.callFunction(Engine.java:382)
    at oracle.rules.rl.RuleSession.callFunctionWithArgumentList(RuleSession.java:404)
    at oracle.rules.rl.RuleSession.callFunctionWithArgument(RuleSession.java:328)
    at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:368)
    at oracle.bpel.services.rules.rpi.AbstractDefaultRuleSession.execute(AbstractDefaultRuleSession.java:245)
    at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:231)
    at oracle.bpel.services.rules.impl.DecisionServiceImpl.process(DecisionServiceImpl.java:1385)
    at oracle.bpel.services.rules.impl.DecisionServiceImpl.assertExecuteWatchStateful(DecisionServiceImpl.java:719)
    at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.invoke_assertExecuteWatchStateful(NewDecisionServiceSOAPBinding_Tie.java:60)
    at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.processingHook(NewDecisionServiceSOAPBinding_Tie.java:451)
    at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:413)
    at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:277)
    at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:134)
    at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.
    at jess.DefinstanceList.assertObject(DefinstanceList.java:564)
    at jess.Rete.assertObject(Rete.java:1554)
    at jess.AssertObject.call(ReflectFunctions.java:1554)
    at jess.FunctionHolder.call(FunctionHolder.java:30)
    at jess.Funcall.execute(Funcall.java:280)
    at oracle.rules.rl.engine.Engine.callFunction(Engine.java:360)
    ... 31 more
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> ORABPEL-36333
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::>
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Error while executing the rule session.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> The rule session DuvalRules06:390024 failed to execute.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Check the underlying exception and correct the error. Contact oracle support if error is not fixable.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::>
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.AbstractDefaultRuleSession.execute(AbstractDefaultRuleSession.java:263)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:231)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.impl.DecisionServiceImpl.process(DecisionServiceImpl.java:1385)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.impl.DecisionServiceImpl.assertExecuteWatchStateful(DecisionServiceImpl.java:719)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.invoke_assertExecuteWatchStateful(NewDecisionServiceSOAPBinding_Tie.java:60)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.processingHook(NewDecisionServiceSOAPBinding_Tie.java:451)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:413)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:277)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:134)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at java.lang.Thread.run(Thread.java:595)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Caused by: ORABPEL-36334
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::>
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Error while executing a rule session unit of work.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> The rule session DuvalRules06:390024 failed to execute a unit of work.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Check the underlying exception and correct the error. Contact oracle support if error is not fixable.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::>
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:497)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.AbstractDefaultRuleSession.execute(AbstractDefaultRuleSession.java:245)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> ... 27 more
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Caused by: oracle.rules.rl.exceptions.EngineException: Internal error: Function assert-object: error in call: Jess reported an error in routine DefinstanceList.definstance
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> while executing (assert-object duvalCounty.StudentImpl@795486).
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Message: Object is not instance of duvalCounty.StudentImpl.Jess reported an error in routine DefinstanceList.definstance
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> while executing (assert-object duvalCounty.StudentImpl@795486).
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Message: Object is not instance of duvalCounty.StudentImpl.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.exceptions.ExceptionFactory.createEngineException(ExceptionFactory.java:797)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.engine.Engine.handleJessException(Engine.java:3245)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.engine.Engine.callFunction(Engine.java:382)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.RuleSession.callFunctionWithArgumentList(RuleSession.java:404)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.RuleSession.callFunctionWithArgument(RuleSession.java:328)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:368)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> ... 28 more
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Caused by: Jess reported an error in routine DefinstanceList.definstance
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> while executing (assert-object duvalCounty.StudentImpl@795486).
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> Message: Object is not instance of duvalCounty.StudentImpl.
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.DefinstanceList.assertObject(DefinstanceList.java:564)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.Rete.assertObject(Rete.java:1554)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.AssertObject.call(ReflectFunctions.java:1554)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.FunctionHolder.call(FunctionHolder.java:30)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at jess.Funcall.execute(Funcall.java:280)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> at oracle.rules.rl.engine.Engine.callFunction(Engine.java:360)
    <2007-04-27 18:39:14,928> <ERROR> <default.collaxa.cube.services> <::> ... 31 more
    <2007-04-27 18:39:14,928> <ERROR> <oracle.bpel.services> <::> Error while executing a rule session unit of work.
    The rule session DuvalRules06:390024 failed to execute a unit of work.
    Check the underlying exception and correct the error. Contact oracle support if error is not fixable.
    ORABPEL-36334
    Error while executing a rule session unit of work.
    The rule session DuvalRules06:390024 failed to execute a unit of work.
    Check the underlying exception and correct the error. Contact oracle support if error is not fixable.
    at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:497)
    at oracle.bpel.services.rules.rpi.AbstractDefaultRuleSession.execute(AbstractDefaultRuleSession.java:245)
    at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.execute(OracleRuleSession.java:231)
    at oracle.bpel.services.rules.impl.DecisionServiceImpl.process(DecisionServiceImpl.java:1385)
    at oracle.bpel.services.rules.impl.DecisionServiceImpl.assertExecuteWatchStateful(DecisionServiceImpl.java:719)
    at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.invoke_assertExecuteWatchStateful(NewDecisionServiceSOAPBinding_Tie.java:60)
    at oracle.bpel.services.rules.runtime.NewDecisionServiceSOAPBinding_Tie.processingHook(NewDecisionServiceSOAPBinding_Tie.java:451)
    at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:413)
    at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:277)
    at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
    at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:134)
    at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.rules.rl.exceptions.EngineException: Internal error: Function assert-object: error in call: Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.
    at oracle.rules.rl.exceptions.ExceptionFactory.createEngineException(ExceptionFactory.java:797)
    at oracle.rules.rl.engine.Engine.handleJessException(Engine.java:3245)
    at oracle.rules.rl.engine.Engine.callFunction(Engine.java:382)
    at oracle.rules.rl.RuleSession.callFunctionWithArgumentList(RuleSession.java:404)
    at oracle.rules.rl.RuleSession.callFunctionWithArgument(RuleSession.java:328)
    at oracle.bpel.services.rules.rpi.oracle.OracleRuleSession.executeUnitOfWork(OracleRuleSession.java:368)
    ... 28 more
    Caused by: Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.
    at jess.DefinstanceList.assertObject(DefinstanceList.java:564)
    at jess.Rete.assertObject(Rete.java:1554)
    at jess.AssertObject.call(ReflectFunctions.java:1554)
    at jess.FunctionHolder.call(FunctionHolder.java:30)
    at jess.Funcall.execute(Funcall.java:280)
    at oracle.rules.rl.engine.Engine.callFunction(Engine.java:360)
    ... 31 more
    07/04/27 18:39:14 pFaultMessage is [email protected]9 name:operationErroredFault
    07/04/27 18:39:14 QName string is operationErroredFault

    Hi everybody,
    Wondering if we could categorize a little bit so that we can put together some kind of tech-note. So far i have seen the following errors:
    1. Something along
    at line 3 column 1 in main
    Caused by: FactClassException: fact class for 'loanoffer.LoanApplicationType' should be declared earlier in rule session
    at line 3 column 1 in main
    This one is usually caused by a RL function having above fact class as one
    of its parameters. The workaround to avoid this is either use 'loanoffer.LoanApplication' as the parameter type or enable 'assertXPath' for the fact 'loanoffer.LoanApplicationType'.
    2. Something like (see above)
    <2007-04-27 18:39:14,928> <ERROR> <oracle.bpel.services> <::> Internal error: Function assert-object: error in call: Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    Message: Object is not instance of duvalCounty.StudentImpl.Jess reported an error in routine DefinstanceList.definstance
    while executing (assert-object duvalCounty.StudentImpl@795486).
    This usually indicates a classloader issue in the decision service itself and it can
    happen if you put the fact class files into some directory which is in the classpath
    of BPEL PM (like ?/bpel/system/classes)
    I'm following up with "soruganti" on the second issue (the one originally posted)
    and we'll post the outcome here.
    Juan: Can you confirm that the issue you're seeing is one of above (1.) or (2.) ?
    Any stack trace available ?
    Nevertheless i'm sure it is somehow unrelated to patch p5665750.
    Best Regards,
    Ralf

  • What do people think about the different Generic Java approaches?

    I have seen a lot of different approaches for Generic Java, and when people find problems with each approach the normal response has been: the other approach is worse with such and such a problem, do you have a better way?
    The different approaches I have seen are: (in no particular order)
    Please correct me if I am wrong and add other approaches if they are worthy of mention.
    1) PolyJ - by MIT
    This is a completely different approach than the others, that introduces a new where clause for bounding the types, and involves changing java byte codes in order to meet it's goals.
    Main comments were not a java way of doing things and far too greater risk making such big changes.
    2) Pizza - by Odersky & Wadler
    This aims at extending java in more ways than just adding Generics. The generic part of this was replaced by GJ, but with Pizza's ability to use primitives as generic types removed, and much bigger changes allowing GJ to interface with java.
    Main comments were that Pizza doesn't work well with java, and many things in Pizza were done in parallel with java, hence were no longer applicable.
    3) GJ - by Bracha, Odersky, Stoutamire & Wadler
    This creates classes with erased types and bridging methods, and inserts casts when required when going back to normal java code.
    Main comments are that type dependent operations such as new, instanceof, casting etc can't be done with parametric types, also it is not a very intuitive approach and it is difficult to work out what code should do.
    4) Runtime Generic Information - by Natali & Viroli
    Each instance holds information about its Runtime Type.
    Main comments from people were that this consumes way too much memory as each instance holds extra information about its type, and the performance would be bad due to checking Type information at runtime that would have been known at compile.
    5) NextGen - by Cartwright & Steele
    For each parameterized class an abstract base class with types erased is made and then for each new type a lightweight wrapper class and interface are created re-using code from the base class to keep the code small.
    Main comments from people were that this approach isn't as backwards compatible as GJ due to replacing the legacy classes with abstract base classes which can't be instantiated.
    6) .NET common runtime - by Kennedy & Syme
    This was written for adding Generics to C#, however the spec is also targeted at other languages such as VB.
    Main comments from people were that this approach isn't java, hence it is not subject to the restrictions of changing the JVM like java is.
    7) Fully Generated Generic Classes - by Agesen, Freund & Mitchell
    For each new type a new class is generated by a custom class loader, with all the code duplicated for each different type.
    Main comments from people were that the generated code size gets too big, and that it is lacking a base class for integration with legacy code.
    8) JSR-14 - by Sun
    This is meant to come up with a solution Generic Solution to be used in java. Currently it is heavily based on GJ and suffering from all the same problems as GJ, along with the fact that it is constantly undergoing change and so no one knows what to expect.
    See this forum for comments about it.
    As if we didn't have enough approaches already, here is yet another one that hopefully has all of the benefits, and none of the problems of the other approaches. It uses information learnt while experimenting with the other approaches. Now when people ask me if I think I have a better approach, I will have somewhere to point them to.
    (I will be happy to answer questions concerning this approach).
    9) Approach #x - by Phillips
    At compile time 1 type is made per generic type with the same name.
    e.g.class HashSet<TypeA> extends AbstractSet<TypeA> implements Cloneable, Serializable will be translated to a type: class HashSet extends AbstractSet implements Cloneable, SerializableAn instance of the class using Object as TypeA can now be created in 2 different ways.
    e.g.Set a = new HashSet();
    Set<Object> b = new HashSet<Object>();
    //a.getClass().equals(b.getClass()) is trueThis means that legacy class files don't even need to be re-compiled in order to work with the new classes. This approach is completely backwards compatible.
    Inside each type that was created from a generic type there is also some synthetic information.
    Information about each of the bounding types is stored in a synthetic field.
    Note that each bounding type may be bounded by a class and any number of interfaces, hence a ';' is used to separate bounding types. If there is no class Object is implied.
    e.g.class MyClass<TypeA extends Button implements Comparable, Runnable; TypeB> will be translated to a type: class MyClass {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Button.class, Comparable.class, Runnable.class}, {Object.class}};This information is used by a Custom Class Loader before generating a new class in order to ensure that the generic types are bounded correctly. It also gets used to establish if this class can be returned instead of a generated class (occurs when the generic types are the same as the bounding types, like for new HashSet<Object> above).
    There is another synthetic field of type byte[] that stores bytes in order for the Custom Class Loader to generate the new Type.
    There are also static methods corresponding to each method that contain the implementation for each method. These methods take parameters as required to gain access to fields, contructors, other methods, the calling object, the calling object class etc. Fields are passed to get and set values in the calling object. Constructors are passed to create new instances of the calling object. Other methods are passed when super methods are called from within the class. The calling object is almost always passed for non static methods, in order to do things with it. The class is passed when things like instanceof the generated type need to be done.
    Also in this class are any non private methods that were there before, using the Base Bounded Types, in order that the class can be used exactly as it was before Generics.
    Notes: the time consuming reflection stuff is only done once per class (not per instance) and stored in static fields. The other reflection stuff getting done is very quick in JDK1.4.1 (some earlier JDKs the same can not be said).
    Also these static methods can call each other in many circumstances (for example when the method getting called is private, final or static).
    As well as the ClassLoader and other classes required by it there is a Reflection class. This class is used to do things that are known to be safe (assuming the compiler generated the classes correctly) without throwing any exceptions.
    Here is a cut down version of the Reflection class: public final class Reflection {
      public static final Field getDeclaredField(Class aClass, String aName) {
        try {
          Field field = aClass.getDeclaredField(aName);
          field.setAccessible(true);
          return field;
        catch (Exception ex) {
          throw new Error(ex);
      public static final Object get(Field aField, Object anObject) {
        try {
          return aField.get(anObject);
        catch (Exception ex) {
          throw new Error(ex);
      public static final void set(Field aField, Object anObject, Object aValue) {
        try {
          aField.set(anObject, aValue);
        catch (Exception ex) {
          throw new Error(ex);
      public static final int getInt(Field aField, Object anObject) {
        try {
          return aField.getInt(anObject);
        catch (Exception ex) {
          throw new Error(ex);
      public static final void setInt(Field aField, Object anObject, int aValue) {
        try {
          aField.setInt(anObject, aValue);
        catch (Exception ex) {
          throw new Error(ex);
    }Last but not least, at Runtime one very lightweight wrapper class per type is created as required by the custom class loader. Basically the class loader uses the Generic Bytes as the template replacing the erased types with the new types. This can be even faster than loading a normal class file from disk, and creating it.
    Each of these classes has any non private methods that were there before, making calls to the generating class to perform their work. The reason they don't have any real code themselves is because that would lead to code bloat, however for very small methods they can keep their code inside their wrapper without effecting functionality.
    My final example assumes the following class name mangling convention:
    * A<component type> - Array
    * b - byte
    * c - char
    * C<class name length><class name> - Class
    * d - double
    * f - float
    * i - int
    * l - long
    * z - boolean
    Final Example: (very cut down version of Vector)public class Vector<TypeA> extends AbstractList<TypeA> implements RandomAccess, Cloneable, Serializable {
      protected Object[] elementData;
      protected int elementCount;
      protected int capacityIncrement;
      public Vector<TypeA>(int anInitialCapacity, int aCapacityIncrement) {
        if (anInitialCapacity < 0) {
          throw new IllegalArgumentException("Illegal Capacity: " + anInitialCapacity);
        elementData = new Object[initialCapacity];
        capacityIncrement = capacityIncrement;
      public synchronized void setElementAt(TypeA anObject, int anIndex) {
        if (anIndex >= elementCount) {
          throw new ArrayIndexOutOfBoundsException(anIndex + " >= " + elementCount);
        elementData[anIndex] = anObject;
    }would get translated as:public class Vector extends AbstractList implements RandomAccess, Cloneable, Serializable {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Object.class}};
      public static final byte[] $GENERIC_BYTES = {/*Generic Bytes Go Here*/};
      protected Object[] elementData;
      protected int elementCount;
      protected int capacityIncrement;
      private static final Field $0 = Reflection.getDeclaredField(Vector.class, "elementData"),
                                 $1 = Reflection.getDeclaredField(Vector.class, "elementCount"),
                                 $2 = Reflection.getDeclaredField(Vector.class, "capacityIncrement");
      static void $3(int _0, Field _1, Object _2, Field _3, int _4) {
        if (_0 < 0) {
          throw new IllegalArgumentException("Illegal Capacity: " + _0);
        Reflection.set(_1, _2, new Object[_0]);
        Reflection.setInt(_3, _2, _4);
      static void $4(int _0, Field _1, Object _2, Field _3, Object _4) {
        if (_0 >= Reflection.getInt(_1, _2)) {
          throw new ArrayIndexOutOfBoundsException(_0 + " >= " + Reflection.getInt(_1, _2));
        ((Object[])Reflection.get(_3, _2))[_0] = _4;
      public Vector(int anInitialCapacity, int aCapacityIncrement) {
        $3(anInitialCapacity, $0, this, $2, aCapacityIncrement);
      public synchronized void setElementAt(Object anObject, int anIndex) {
        $4(anIndex, $1, this, $0, anObject);
    } and new Vector<String> would get generated as:public class Vector$$C16java_lang_String extends AbstractList$$C16java_lang_String implements RandomAccess, Cloneable, Serializable {
      protected Object[] elementData;
      protected int elementCount;
      protected int capacityIncrement;
      private static final Field $0 = Reflection.getDeclaredField(Vector$$C16java_lang_String.class, "elementData"),
                                 $1 = Reflection.getDeclaredField(Vector$$C16java_lang_String.class, "elementCount"),
                                 $2 = Reflection.getDeclaredField(Vector$$C16java_lang_String.class, "capacityIncrement");
      public Vector$$C16java_lang_String(int anInitialCapacity, int aCapacityIncrement) {
        Vector.$3(anInitialCapacity, $0, this, $2, aCapacityIncrement);
      public synchronized void setElementAt(String anObject, int anIndex) {
        Vector.$4(anIndex, $1, this, $0, anObject);
    }Comparisons with other approaches:
    Compared with PolyJ this is a very java way of doing things, and further more it requires no changes to the JVM or the byte codes.
    Compared with Pizza this works very well with java and has been designed using the latest java technologies.
    Compared with GJ all type dependent operations can be done, and it is very intuitive, code does exactly the same thing it would have done if it was written by hand.
    Compared with Runtime Generic Information no extra information is stored in each instance and hence no extra runtime checks need to get done.
    Compared with NextGen this approach is completely backwards compatible. NextGen looks like it was trying to achieve the same goals, but aside from non backwards compatibility also suffered from the fact that Vector<String> didn't extend AbstractList<String> causing other minor problems. Also this approach doesn't create 2 types per new types like NextGen does (although this wasn't a big deal anyway). All that said NextGen was in my opinion a much better approach than GJ and most of the others.
    Compared to .NET common runtime this is java and doesn't require changes to the JVM.
    Compared to Fully Generated Generic Classes the classes generated by this approach are very lightweight wrappers, not full blown classes and also it does have a base class making integration with legacy code simple. It should be noted that the functionality of the Fully Generated Generic Classes is the same as this approach, that can't be said for the other approaches.
    Compared with JSR-14, this approach doesn't suffer from GJ's problems, also it should be clear what to expect from this approach. Hopefully JSR-14 can be changed before it is too late.

    (a) How you intend generic methods to be translated.
    Given that Vector and Vector<Object> are unrelated types,
    what would that type be represented as in the byte code of
    the method? In my approach Vector and Vector<Object> are related types. In fact the byte code signature of the existing method is exactly the same as it was in the legacy code using Vector.
    To re-emphasize what I had said when explaining my approach:
    System.out.println(Vector.class == Vector<Object>.class);  // displays true
    System.out.println(Vector.class == Vector<String>.class);  // displays false
    Vector vector1 = new Vector<Object>(); // legal
    Vector<Object> vector2 = new Vector();  // legal
    // Vector vector3 = new Vector<String>(); // illegal
    // Vector<String> vector4 = new Vector();  // illegal
    Vector<String> vector5 = new Vector<String>();  // legal
    You must also handle the case where the type
    parameter is itself a parameterized type in which the type
    parameter is not statically bound to a ground instantiation.This is also very straightforward: (let me know if I have misunderstood you)
    (translation of Vector given in my initial description)
    public class SampleClass<TypeA> {
      public static void main(String[] args) {
        System.out.println(new Vector<Vector<TypeA>>(10, 10));
    }would get translated as:public class SampleClass {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Object.class}};
      public static final byte[] $GENERIC_BYTES = {/*Generic Bytes Go Here*/};
      private static final Constructor $0 = Reflection.getDeclaredConstructor(Vector$$C16java_util_Vector.class, new Class[] {int.class, int.class});
      static void $1(Constructor _0, int _1, int _2) {
        try {
          System.out.println(Reflection.newInstance(_0, new Object[] {new Integer(_1), new Integer(_2)}));
        catch (Exception ex) {
          throw (RuntimeException)ex;
      public static void main(String[] args) {
        $1($0, 10, 10);
    }and SampleClass<String> would get generated as:public class SampleClass$$C16java_lang_String {
      private static final Constructor $0 = Reflection.getConstructor(Vector$$C37java_util_Vector$$C16java_lang_String.class, new Class[] {int.class, int.class});
      public static void main(String[] args) {
        SampleClass.$1($0, 10, 10);
    Also describe the implementation strategy for when these
    methods are public or protected (i.e. virtual).As I said in my initial description that for non final, non static, non private method invocations a Method may be passed into the implementing synthetic method as a parameter.
    Note: the following main method will display 'in B'.
    class A {
      public void foo() {
        System.out.println("in A");
    class B extends A {
      public void foo() {
        System.out.println("in B");
    public class QuickTest {
      public static void main(String[] args) {
        try {
          A.class.getMethod("foo", null).invoke(new B(), null);
        catch (Exception ex) {}
    }This is very important as foo() may be overwritten by a subclass as it is here. By passing a Method to the synthetic implementation this guarantees that covariance, invariance and contra variance all work exactly the same way as in java. This is a fundamental problem with many other approaches.
    (b) The runtime overhead associated with your translationAs we don't have a working solution to compare this to, performance comments are hard to state, but I hope this helps anyway.
    The Class Load time is affected in 4 ways. i) All the Generic Bytes exist in the Base Class, hence they don't need to be read from storage. ii) The custom class loader, time to parse the name and failed finds before it finally gets to define the class. iii) The generation of the generic bytes to parametric bytes (basically involves changing bytes from the Constant Pool worked out from a new Parametric type, Utf8, Class and the new Parametric Constant types may all be effected) iv) time to do the static Reflection stuff (this is the main source of the overhead). Basically this 1 time per class overhead is nothing to be concerned with, and Sun could always optimize this part further.
    The normal Runtime overhead (once Classes have been loaded) is affected mainly by reflection: On older JDKs the reflection was a lot slower, and so might have made a noticeable impact. On newer JDKs (since 1.4 I think), the reflection performance has been significantly improved. All the time consuming reflection is done once per class (stored in static fields). The normal reflection is very quick (almost identical to what is getting done without reflection). As the wrappers simply include a single method call to another method, these can be in-lined and hence made irrelevant. Furthermore it is not too difficult to make a parameter that would include small methods in the wrapper classes, as this does not affect functionality in the slightest, however in my testing I have found this to be unnecessary.
    (c) The space overhead (per instantiation)There are very small wrapper classes (one per new Type) that simply contain all non private methods, with single method calls to the implementing synthetic method. They also include any fields that were in the original class along with other synthetic fields used to store reflected information, so that the slow reflection only gets done once per new Type.
    (d) The per-instance space overheadNone.
    (e) Evidence that the proposed translation is sound and well-defined for all relevant cases (see below)Hope this is enough, if not let me know what extra proof you need.
    (f) Evidence for backward compatibility
    (For example, how does an old class file that passes a Vector
    to some method handle the case when the method receives a Vector<T>
    where T is a type parameter? In your translation these types are unrelated.)As explained above, in my approach these are only unrelated for T != Object, in the legacy case T == Object, hence legacy code passing in Vector is exactly the same as passing in Vector<Object>.
    (g) Evidence for forward compatibility
    (How, exactly, do class files that are compiled with a generics compiler run on an old VM)They run exactly the same way, the byte codes from this approach are all legal java, and all legal java is also legal in this approach. In order to take advantage of the Generics the Custom Class Loader would need to be used or else one would get ClassNotFoundExceptons, the same way they would if they tried using Collections on an old VM without the Collections there. The Custom Class Loader even works on older VMs (note it may run somewhat slower on older VMs).
    (h) A viable implementation strategyType specific instantiations are at Class Load time, when the Custom Class Loader gets asked for a new Class, it then generates it.
    The type specific instantiations are never shipped as they never get persisted. If you really wanted to save them all you need to do is save them with the same name (with the $$ and _'s etc), then the class loader would find them instead of generating them. There is little to be gained by doing this and the only reason I can think of for doing such a thing would be if there was some reason why the target VM couldn't use the Custom Class Loader (the Reflection class would still need to be sent as well, but that is nothing special). Basically they are always generated at Runtime unless a Class with the same name already exists in which case it would be used.
    The $GENERIC_DESCRIPTOR and $GENERIC_BYTES from the base class along with the new Type name are all that is required to generate the classes at runtime. However many other approaches can achieve the same thing for the generation, and approaches such as NextGen's template approach may be better. As this generation is only done once per class I didn't put much research into this area. The way it currently works is that the $GENERIC_DESCRIPTOR are basically used to verify that a malicious class files is not trying to create a non Type Safe Type, ie new Sample<Object>() when the class definition said class Sample<TypeA extends Button>. The $GENERIC_BYTES basically correspond to the normal bytes of a wrapper class file, except that in the constant pool it has some constants of a new Parametric Constant type that get replaced at class load time. These parametric constants (along with possibly Utf8 and Class constants) are replaced by the Classes at the end of the new type name, a little more complex than that but you probably get the general idea.
    These fine implementation details don't affect the approach so much anyway, as they basically come down to class load time performance. Much of the information in the $GENERIC_BYTES could have been worked out by reflection on the base type, however at least for now simply storing the bytes is a lot easier.
    Note: I have made a small syntax change to the requested class:
    public T(X datum) --> public T<X>(X datum)
    class T<X> {
      private X datum;
      public T<X>(X datum) {
        this.datum = datum;
      public T<T<X>> box() {
        return new T<T<X>>(this);
      public String toString() {
        return datum.toString();
      public static void main(String[] args) {
        T<String> t = new T<String>("boo!");
        System.out.println(t.box().box());
    }would get translated as:
    class T {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Object.class}};
      public static final byte[] $GENERIC_BYTES = {/*Generic Bytes Go Here*/};
      private Object datum;
      private static final Field $0 = Reflection.getDeclaredField(T.class, "datum");
      private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C1T.class, new Class[] {T.class});
      static void $2(Field _0, Object _1, Object _2) {
        Reflection.set(_0, _1, _2);
      static Object $3(Constructor _0, Object _1) {
        try {
          return Reflection.newInstance(_0, new Object[] {_1});
        catch (Exception ex) {
          throw (RuntimeException)ex;
      static String $4(Field _0, Object _1) {
        return Reflection.get(_0, _1).toString();
      static void $5() {
        T$$C16java_lang_String t = new T$$C16java_lang_String("boo!");
        System.out.println(t.box().box());
      public T(Object datum) {
        $2($0, this, datum);
      public T$$C1T box() {
        return (T$$C1T)$3($1, this);
      public String toString() {
        return $4($0, this);
      public static void main(String[] args) {
        $5();
    }as the generic bytes aren't very meaningful and by no means a requirement to this approach (NextGen's template method for generation may work just as well), here are the generated classes with some unused code commented out instead:
    class T$$C28T$$C22T$$C16java_lang_String {
      private T$$C22T$$C16java_lang_String datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C28T$$C22T$$C16java_lang_String.class, "datum");
    //  private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C34T$$C28T$$C22T$$C16java_lang_String.class, new Class[] {T$$C28T$$C22T$$C16java_lang_String.class});
      public T$$C28T$$C22T$$C16java_lang_String(T$$C22T$$C16java_lang_String datum) {
        T.$2($0, this, datum);
    //  public T$$C34T$$C28T$$C22T$$C16java_lang_String box() {
    //    return (T$$C34T$$C28T$$C22T$$C16java_lang_String)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    class T$$C22T$$C16java_lang_String {
      private T$$C16java_lang_String datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C22T$$C16java_lang_String.class, "datum");
      private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C28T$$C22T$$C16java_lang_String.class, new Class[] {T$$C22T$$C16java_lang_String.class});
      public T$$C22T$$C16java_lang_String(T$$C16java_lang_String datum) {
        T.$2($0, this, datum);
      public T$$C28T$$C22T$$C16java_lang_String box() {
        return (T$$C28T$$C22T$$C16java_lang_String)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    class T$$C1T {
      private T datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C1T.class, "datum");
    //  private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C6T$$C1T.class, new Class[] {T$$C1T.class});
      public T$$C1T(T datum) {
        T.$2($0, this, datum);
    //  public T$$C6T$$C1T box() {
    //    return (T$$C6T$$C1T)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    class T$$C16java_lang_String {
      private String datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C16java_lang_String.class, "datum");
      private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C22T$$C16java_lang_String.class, new Class[] {T$$C16java_lang_String.class});
      public T$$C16java_lang_String(String datum) {
        T.$2($0, this, datum);
      public T$$C22T$$C16java_lang_String box() {
        return (T$$C22T$$C16java_lang_String)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    }the methods from the Reflection class used in these answers not given in my initial description are:
      public static final Object newInstance(Constructor aConstructor, Object[] anArgsArray) throws Exception {
        try {
          return aConstructor.newInstance(anArgsArray);
        catch (InvocationTargetException ex) {
          Throwable cause = ex.getCause();
          if (ex instanceof Exception) {
            throw (Exception)ex;
          throw new Error(ex.getCause());
        catch (Exception ex) {
          throw new Error(ex);
      public static final Constructor getDeclaredConstructor(Class aClass, Class[] aParameterTypesArray) {
        try {
          Constructor constructor = aClass.getDeclaredConstructor(aParameterTypesArray);
          constructor.setAccessible(true);
          return constructor;
        catch (Exception ex) {
          throw new Error(ex);
      }

  • Unable to create the Rule Index (SEM_APIS.CREATE_RULES_INDEX) getting error

    Hi,
    I am trying to create the Rule Index with the below script its giving the temp table space error.
    The number of records in that specific table is 17473708 (17+ M) and the available temp space is 120GB.
    Execute SEM_APIS.CREATE_RULEBASE('ecc_md_rb')
    --Insert to mdsys.semr_ecc_md_rb Values(.............)
    BEGIN
    SEM_APIS.CREATE_RULES_INDEX(
    'ecc_rule_indx',
    SEM_Models('FOUNDATION'),
    SEM_Rulebases('RDFS','ecc_dm_rb'));
    END;
    Create rule index statement is running more than 8hrs and i tried with the sem_apis.create_entailment its also giving the same Temp table space error.
    Please find the below error details
    BEGIN sem_apis.create_entailment('ecc_rule_inx', sem_models('FOUNDATION'), sem_rulebases('OWLPRIME','ecc_dm_rb'),SEM_APIS.REACH_CLOSURE,'RDFS2-, RDFS3-, RDFS4a-, RDFS4b-, RDFS5-, RDFS6-, RDFS7-, RDFS8-, RDFS9-, RDFS10-, RDFS11-, RDFS12-, RDFS13-','USER_RULES=T'); END;
    Error at line 1
    ORA-29532: Java call terminated by uncaught Java exception: oracle.jdbc.driver.OracleSQLException: ORA-01652: unable to extend temp segment by 64 in tablespace TEMP
    ORA-06512: at "MDSYS.SDO_SEM_INFERENCE";, line 4866
    ORA-06512: at "MDSYS.RDF_APIS";, line 16
    ORA-06512: at line 1
    Please Help me to create rule index.
    Note: I am using Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Regards,
    Kavitha.

    Hi,
    Please use the create_entailment API.
    As far as temp tablespace goes, please create a bigfile temp tablespace. You can follow Slide #36 of the
    following document.
    http://download.oracle.com/otndocs/tech/semantic_web/pdf/2010_ora_semtech_wkshp.pdf
    Thanks,
    Zhe Wu

  • Oracle Rules: Adding Java Facts - not showing up in list.

    I am having trouble with adding my own Java classes to the Java Facts. I find the class in the list of classes, tick it, and hit "Ok". When I come back to the list of Java Facts, the class has not been added to the list. And no error message is displayed.
    I am able to add default classes under packages java, javax and org.
    My Java-classes are located here: ...\MyProject\SCA-INF\classes\packageName
    The .rules-file is located here: ...\MyProject\oracle\rules\packageName
    What can be the reason for this?

    I just had a similar issue and I ended having to manually clean up the registry to get Java working again.
    I just got a new computer at work and it had Java 7 installed but it turns out an app we need to use at work doesn't work with Java 7, only Java 6.
    I uninstalled Java 7 and installed Java 6 but Firefox was not showing the Java plugin as installed. I tried all sorts of things, including uninstalling and reinstalling Firefox and none of it worked. Finally I again uninstalled Java and then I searched for "Java" in the registry and found TONS of entries still in there for Java, including for Java 7. I manually deleted all the entries (WARNING: this is extremely risky) rebooted, then installed Java 6 and now it's working fine.
    I really hate it when uninstallers leave stuff behind. It just makes a mess.

  • Calling Java Constructor from Oracle Stored Procedure

    Hi all,
    I have come across a situation where on insert into one Oracle database instance, a trigger will be fired which will call a procedure which in turn calls a Java constructor with 2 string arguments(The Java class is loaded into another instance of Oracle using Loadjava).
    (Note: I don't want to call a static method from the Oracle procedure)
    I have seen some examples where in using links, on insertion into a table another table of another instance can also be updated.
    for ex: "INSERT INTO testuser.sal_audit@mainlink VALUES (?, ?, ?)" where "mainlink" is a DB link between the 2 instances.
    Similarly is it possble to call the Java constructor loaded in another instance?
    I have tried in this way. It's not working.
    create or replace procedure pr_Cust_object(FeData varchar2,szDummy varchar2) as
    LANGUAGE JAVA NAME
    'CustomObject@mainLink(java.lang.String, java.lang.String)';
    end pr_Cust_object;
    Expecting help at the earliest--ASAP.
    Thanks and Regards,
    Narendra S K

    I don't know how to do that, but I would be interested in knowing how long each insert/update/delete (which ever the trigger fires on) takes.
    And the logic for rollbacks is probably really interesting.

  • Oracle Business Rule : Unable to modify the rule at runtime

    Hi
    I am developing simple Business rule using Oracle jdevelper 11g which displays a message based on two rules.
    rule1 : If amount <= 100, displays the message "Less than or equal to 100"
    rule2 : If amount >100 and amount less than 200 display the message "Between 100 and 200"
    The above rule is created within the BPEL process which accepts a parameter. Once the BPEL project has been published, it has created a Dictionary with one ruleset having two rules mentioned above.
    If I test the BPEL process through em console response is getting displayed based on the above rule.
    Now I am trying to modify Rule2 through SOA Composer as below.
    Rule2 : If amount >100 and amount less than 300 display the message "Between 100 and 300"
    After editing and modifying the rule , the message is not getting updated properly in the properties window. If I save and commit the rule, BPEL process is giving the error
    If any one has faced this problem and got the solution, please help me to solve this issue
    Thanks in advance

    Hi
    Thanks for the response.
    I have saved and committed the new rule. When modified the rule, assert new value is displaying as blank. If I click on Validate button, it is not displaying any error. Once I save and commit it is showing below error in BPEL Process
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:575) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:381) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:298) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source) at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:788) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:306) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) 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:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:260) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:992) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:729) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:569) ... 79 more Caused by: javax.xml.ws.soap.SOAPFaultException: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1024) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:808) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:256) ... 82 more

  • Business Rules error-java.lang.NoClassDefFoundError: com/hyperion/hbr/core/

    Hey I recently applied the 11.1.1.3.04 service fix for calc mgr/planning which involved a few file changes for EAS as well.
    I patched and re-deployed calc mgr/planning/eas without any issues in DEV
    When I patched prod, and then redeployed the web servers, business rules is now failing.
    This error is in the planning log:
    java.lang.NoClassDefFoundError: com/hyperion/hbr/core/HBRThinServer
    and this error is in EAS log when I login to EAS:
    ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.db.DBTable - Error while creating Repository object. Please make sure your HBR Configuration is correct.
    ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.PluginDataManager - Error creating PluginDataManager. Please check your log file for details on what caused this error.
    Anyone run into this issue and have any advice how to solve it? I also opened an issue with Oracle
    THanks
    Jeff

    Thanks for the advice Nick.
    I decided to redeploy EAS app server again, but this time also re-register the database. the register database step was not needed when I patched dev or test, perhaps because in dev and test planning and eas were on the same server. In prod, eas and planning are on different servers.
    so after registering and re-using the existing tables so that I wouldn't lose my rules, the app deployed without any errors in the logs and all my business rule problems have been resolved.
    Thanks
    Jeff

  • Sed rules to java regex

    Hi,
    what is the connection between sed regex rules and java regex rule. Is there an easy way to convert sed to java? or do i have to learn sed?....
    Thanks

    IIRC, Java regex rules are like Perl's (although the syntax for invocation differs a bit), and Perl's are basically a superset of sed's, except there's a difference with parentheses. In Perl/Java, parentheses always group and you have to backslash-quote them to make them interpreted as plain parenthesis characters, whereas in sed, you backslash-quote them to make them be interpreted as grouping indicators.
    Why? What problem are you having?

  • Com.bea.p13n.rules.manager.RuleSetNotFoundException: The rule set with URI /segments/GlobalClassifications.rls could not be located by the class named com.bea.p13n.rules.manager.internal.RuleSetPersistenceManager

    Hi,
    I am getting below exceptions in weblogic portal 10.3.5 which is upgraded from 10.3.4 portal. I have a datasync project .when try to run from workshop(eclipse IDE) getting below error.
    com.bea.p13n.servlets.jsp.JspException: DivTag: The retrieved advice is incomplete. See the processing error list for more information.
    com.bea.p13n.advisor.internal.AdviceImpl@299d48
    Identifier: 1377808035572
    Complete: true
    Last Result: null
    ProcessingError List:
    (1) com.bea.p13n.advisor.internal.ProcessingErrorImpl@1504ee
    Description: Exception evaluating ruleset.
    Source: com.bea.p13n.rules.advislets.RulesAdvisletImpl@e6d518
    Advisor: com.bea.p13n.advisor.internal.AdvisorImpl@b04a4e
    Metadata: com.bea.p13n.common.internal.MetadataImpl@1de62ee
    Name: UnmappedRulesAdvislet
    Description: Advislet that can evalaute a ruleset and return the instantiated objects.
    Author: BEA Systems
    Version: com.bea.p13n.common.internal.VersionImpl@13130a2 Description: WLP 9.2 Number: 9.2, Build Number 1.
    Parameters: {ruleset-name=/segments/GlobalClassifications.rls, ignore-rule-name=false}
    User data: null
    Exception: com.bea.p13n.rules.manager.RuleSetNotFoundException: The rule set with URI /segments/GlobalClassifications.rls could not be located by the class named com.bea.p13n.rules.manager.internal.RuleSetPersistenceManager.
    at com.bea.p13n.rules.manager.internal.RuleSetPersistenceManager.getRuleSet(RuleSetPersistenceManager.java:408)
    at com.bea.p13n.rules.manager.internal.ContextPool.<init>(ContextPool.java:149)
    at com.bea.p13n.rules.manager.internal.ContextPoolFactory.getContextPool(ContextPoolFactory.java:214)
    at com.bea.p13n.rules.manager.internal.RulesManagerImpl.getContext(RulesManagerImpl.java:480)
    at com.bea.p13n.rules.manager.internal.RulesManagerImpl.evaluate(RulesManagerImpl.java:353)
    at com.bea.p13n.rules.manager.internal.RulesManagerImpl.evaluateRule(RulesManagerImpl.java:194)
    at com.bea.p13n.rules.manager.internal.RulesManager_jswjkk_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.bea.p13n.rules.manager.internal.RulesManager_jswjkk_EOImpl.evaluateRule(Unknown Source)
    at com.bea.p13n.rules.advislets.RulesAdvisletImpl.getAdvice(RulesAdvisletImpl.java:190)
    at com.bea.p13n.advisor.internal.AdvisorImpl.getAdvice(AdvisorImpl.java:74)
    at com.bea.p13n.advisor.internal.CompoundAdvisletImpl.getAdvice(CompoundAdvisletImpl.java:88)
    at com.bea.p13n.advisor.internal.AdvisorImpl.getAdvice(AdvisorImpl.java:74)
    at com.bea.p13n.advisor.internal.EjbAdvisorImpl.getAdvice(EjbAdvisorImpl.java:62)
    at com.bea.p13n.advisor.internal.EjbAdvisor_t707wa_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.bea.p13n.advisor.internal.EjbAdvisor_t707wa_EOImpl.getAdvice(Unknown Source)
    at com.bea.p13n.servlets.jsp.taglib.DivTag.includeBody(DivTag.java:103)
    at com.bea.p13n.servlets.jsp.taglib.DivTag.doStartTag(DivTag.java:169)
    at jsp_servlet._portlets._footerlinks.__footerlinks._jspService(__footerlinks.java:247)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at org.apache.beehive.netui.pageflow.PageFlowPageFilter.continueChainNoWrapper(PageFlowPageFilter.java:455)
    at org.apache.beehive.netui.pageflow.PageFlowPageFilter.runPage(PageFlowPageFilter.java:432)
    at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:284)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at com.bea.netuix.servlets.filters.IncludeSecurityFilter.doFilter(IncludeSecurityFilter.java:103)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
    at com.bea.netuix.servlets.controls.content.JspContent.beginRender(JspContent.java:558)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
    at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
    at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:488)
    at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:152)
    at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62)
    at jsp_servlet._framework._skeletons._ceoportal.__flowlayout._jspService(__flowlayout.java:139)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    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:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
    at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:148)
    at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
    at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
    at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
    at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:488)
    at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:152)
    at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62)
    at jsp_servlet._framework._skeletons._ceoportal.__gridlayout._jspService(__gridlayout.java:357)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    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:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
    at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:148)
    at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
    at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
    at com.bea.netuix.servlets.manager.UIServlet.processControlTree(UIServlet.java:373)
    at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:993)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3729)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3695)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2285)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2184)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1459)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    The following document describes about how datasync data is deployed in various scenarios.
    http://download.oracle.com/docs/cd/E13218_01/wlp/docs100/prodOps/preparing.html#wp1029497
    Assuming you are making use of workshop for creating the user segment and deploying to a single server which is in development mode, I would recommend you check if you have hit any OOM issues on the server or not, and try restarting the server, and redeploying your app. Generally this should resolve the issue.
    If the server to which you are deploying is running in production mode / deploying as an EAR then the above referred doc will guide you on the next steps.

  • What are the rules of overriding?

    What are the rules of overriding?

    What are the rules of overriding?The best general source for all questions of this type must be The Java Programming Language by Gosling and others.

  • Association Rules - dmardemo.java - DisplayAssociationRules method

    Hi, friends!
    I'm making some changes in the sample Java demo for the Association Rules - dmardemo.java. I've created another method which contains the name of the model just created before and in this same method, I call the method to display the association rules detected:
    public static void restoreRules(String modelNome) throws JDMException {
    m_modelName = modelNome;
    model = (AssociationModel)m_dmeConn.retrieveObject(
    m_modelName, NamedObject.model);
    displayAssociationRules(model);
    In another class, which is a GUI, I'm trying to call that method to restore all the rules found in the mining process and display them in a jTable Swing component. For this, I've tried to adapt the main method (displayAssocationRules) to do this, as follows:
    public static Object displayAssociationRules(AssociationModel model)
    throws JDMException {
    // DISPLAY TOP-10 ASSOCIATION RULES
    Object[] obj = new Object[5];
    int contador = 0;
    // 1. Set order by confidence DESC, support DESC
    OraRulesFilter filter = (OraRulesFilter) m_filterFactory.create();
    filter.setOrderingCondition(
    new RuleProperty[] { RuleProperty.confidence, RuleProperty.support},
    new SortOrder[] { SortOrder.descending, SortOrder.descending }
    // 2. Set to return the first 10 rules only
    filter.setMaxNumberOfRules(10);
    // 3. Retrieve rules
    Collection rules = model.getRules(filter);
    Iterator iRules = rules.iterator();
    while( iRules.hasNext() )
    OraAssociationRule rule = (OraAssociationRule) iRules.next();
    obj[0] = rule.getRuleIdentifier();
    //System.out.print( "Rule " + rule.getRuleIdentifier() + ": " );
    Itemset antecedent = rule.getAntecedent();
    //obj[1] = antecedent.getItems();
    Object[] ante_items = antecedent.getItems();
    // sort the items in antecedent to produce deterministic order of items
    TreeSet sortedSet = new TreeSet();
    for(int i = 0; i < obj.length; i++)
    sortedSet.add(ante_items);
    obj[1] = ante_items;
    Iterator sortedI = sortedSet.iterator();
    /*while(sortedI.hasNext())
    System.out.print(sortedI.next() + " ");*/
    Itemset consequent = rule.getConsequent();
    Object[] cons_items = consequent.getItems();
    obj[2] = cons_items;
    obj[3] = m_df.format(rule.getSupport());
    obj[4] = m_df.format(rule.getConfidence());
    /*System.out.println("==> " + cons_items[0] + " (support=" +
    m_df.format(rule.getSupport()) + ", confidence=" + m_df.format(rule.getConfidence()) + ")" );*/
    return obj;
    Some parts of the old code are present in that for you to compare what I've done. However, it's not working. What should I do to see the rules generated in the process in a jTable?
    Regards
    Luis

    As you can see in the code above, I've split the code into two parts. However, a problem is happening when I try to restore the rules to the GUI.
    "Exception in thread "AWT-EventQueue-0" javax.datamining.JDMIllegalArgumentException: The required argument objectName is null. Supply a non-null value."
    It says that I'm not passing any parameters to the method. But, as you can see, in the first method I've created, I took the name of the model and transfers it for the method displayAssociationRules as a AssociationModel objet.
    In the GUI, in an event for the button "Restore Rules", I've put this code below:
    String modelo = Principal.getModelName(); // where Principal is the main GUI class for the execution of the process.
    dmardemo.restoreRules(modelo);// I call the method in the dmardemo class to restore the rules having a String (modelo) as its parameter. That's when the problem happens. Is the argument really null, as the error message says?
    Regards
    Luis

  • Crawling the Web with Java

    Hi everyone.
    I've been trying to learn how to make a web crawler in java following this detailed albeit old tutorial: http://www.devarticles.com/c/a/Java/Crawling-the-Web-with-Java/
    The SearchCrawler class they feature can be found in two parts:
    First part: http://www.devarticles.com/c/a/Java/Crawling-the-Web-with-Java/3/
    Second part: http://www.devarticles.com/c/a/Java/Crawling-the-Web-with-Java/4/
    I don't want to copy and paste the code because it is really long and an eyesore if viewing here.
    I get a lot of errors when compiling of which I do not understand. The majority of the errors (62 of them to be precise) are "class, interface or enum expected" errors, with the remaining few being "illegal start of type" and "<identifier> expected" errors.
    Can someone here perhaps take a look at it and compile it and see if they also get the same errors? I realise it is an old tutorial but there are hardly any detailed resources I can find for java web crawlers.
    Thanks.

    Odd I can't seem to log into my account. Never mind.
    I have used java before, the problem here I suppose is I'm not good enough to spot what's the problem. The code seems fine bracket wise and it has really left me stumped.
    If someone code put it in their editor and attempt to compile and see if I'm not the only one that's having a problem.. that would be much appreciated.
    For your convenience... the code from the example I linked:
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.regex.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // The Search Web Crawler
    public class SearchCrawler extends JFrame
      // Max URLs drop-down values.
      private static final String[] MAX_URLS =
        {"50", "100", "500", "1000"};
      // Cache of robot disallow lists.
      private HashMap disallowListCache = new HashMap();
      // Search GUI controls.
      private JTextField startTextField;
      private JComboBox maxComboBox;
      private JCheckBox limitCheckBox;
      private JTextField logTextField;
      private JTextField searchTextField;
      private JCheckBox caseCheckBox;
      private JButton searchButton;
      // Search stats GUI controls.
      private JLabel crawlingLabel2;
      private JLabel crawledLabel2;
      private JLabel toCrawlLabel2;
      private JProgressBar progressBar;
      private JLabel matchesLabel2;
      // Table listing search matches.
      private JTable table;
      // Flag for whether or not crawling is underway.
      private boolean crawling;
      // Matches log file print writer.
      private PrintWriter logFileWriter;
      // Constructor for Search Web Crawler.
      public SearchCrawler()
        // Set application title.
        setTitle("Search Crawler");
        // Set window size.
        setSize(600, 600);
         // Handle window closing events.
        addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
           actionExit();
        // Set up File menu.
        JMenuBar menuBar = new JMenuBar();
        JMenu fileMenu = new JMenu("File"); 
        fileMenu.setMnemonic(KeyEvent.VK_F);
        JMenuItem fileExitMenuItem = new JMenuItem("Exit",
          KeyEvent.VK_X);
        fileExitMenuItem.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) { 
            actionExit();
        fileMenu.add(fileExitMenuItem);
        menuBar.add(fileMenu);
        setJMenuBar(menuBar);
        // Set up search panel.
        JPanel searchPanel = new JPanel();
        GridBagConstraints constraints;
        GridBagLayout layout = new GridBagLayout();
        searchPanel.setLayout(layout);
        JLabel startLabel = new JLabel("Start URL:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST; 
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(startLabel, constraints);
        searchPanel.add(startLabel);
        startTextField = new JTextField();
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 0, 5);
        layout.setConstraints(startTextField, constraints);
        searchPanel.add(startTextField);
        JLabel maxLabel = new JLabel("Max URLs to Crawl:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(maxLabel, constraints);
        searchPanel.add(maxLabel);
        maxComboBox = new JComboBox(MAX_URLS);
        maxComboBox.setEditable(true);
        constraints = new GridBagConstraints();
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(maxComboBox, constraints);
        searchPanel.add(maxComboBox);
        limitCheckBox =
          new JCheckBox("Limit crawling to Start URL site");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.WEST;
        constraints.insets = new Insets(0, 10, 0, 0);
        layout.setConstraints(limitCheckBox, constraints);
        searchPanel.add(limitCheckBox);
        JLabel blankLabel = new JLabel();
        constraints = new GridBagConstraints();
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        layout.setConstraints(blankLabel, constraints);
        searchPanel.add(blankLabel);
        JLabel logLabel = new JLabel("Matches Log File:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(logLabel, constraints);
        searchPanel.add(logLabel);
        String file =
          System.getProperty("user.dir") +
          System.getProperty("file.separator") +
          "crawler.log";
        logTextField = new JTextField(file);
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 0, 5);
        layout.setConstraints(logTextField, constraints);
        searchPanel.add(logTextField);
        JLabel searchLabel = new JLabel("Search String:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST; 
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(searchLabel, constraints);
        searchPanel.add(searchLabel);
        searchTextField = new JTextField();
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.insets = new Insets(5, 5, 0, 0);
        constraints.gridwidth= 2;
        constraints.weightx = 1.0d;
        layout.setConstraints(searchTextField, constraints);
        searchPanel.add(searchTextField);
        caseCheckBox = new JCheckBox("Case Sensitive");
        constraints = new GridBagConstraints();
        constraints.insets = new Insets(5, 5, 0, 5);
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        layout.setConstraints(caseCheckBox, constraints);
        searchPanel.add(caseCheckBox);
        searchButton = new JButton("Search");
        searchButton.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            actionSearch();
        constraints = new GridBagConstraints();
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 5, 5);
        layout.setConstraints(searchButton, constraints);
        searchPanel.add(searchButton);
        JSeparator separator = new JSeparator();
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 5, 5);
        layout.setConstraints(separator, constraints);
        searchPanel.add(separator);
        JLabel crawlingLabel1 = new JLabel("Crawling:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(crawlingLabel1, constraints);
        searchPanel.add(crawlingLabel1);
        crawlingLabel2 = new JLabel();
        crawlingLabel2.setFont(
          crawlingLabel2.getFont().deriveFont(Font.PLAIN));
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 0, 5);
        layout.setConstraints(crawlingLabel2, constraints);
        searchPanel.add(crawlingLabel2);
        JLabel crawledLabel1 = new JLabel("Crawled URLs:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(crawledLabel1, constraints);
        searchPanel.add(crawledLabel1);
        crawledLabel2 = new JLabel();
        crawledLabel2.setFont(
          crawledLabel2.getFont().deriveFont(Font.PLAIN));
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 0, 5);
        layout.setConstraints(crawledLabel2, constraints);
        searchPanel.add(crawledLabel2);
        JLabel toCrawlLabel1 = new JLabel("URLs to Crawl:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(toCrawlLabel1, constraints);
        searchPanel.add(toCrawlLabel1);
        toCrawlLabel2 = new JLabel();
        toCrawlLabel2.setFont(
          toCrawlLabel2.getFont().deriveFont(Font.PLAIN));
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 0, 5);
        layout.setConstraints(toCrawlLabel2, constraints);
        searchPanel.add(toCrawlLabel2);
        JLabel progressLabel = new JLabel("Crawling Progress:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 0, 0);
        layout.setConstraints(progressLabel, constraints);
        searchPanel.add(progressLabel);
        progressBar = new JProgressBar();
        progressBar.setMinimum(0);
        progressBar.setStringPainted(true);
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 0, 5);
        layout.setConstraints(progressBar, constraints);
        searchPanel.add(progressBar);
        JLabel matchesLabel1 = new JLabel("Search Matches:");
        constraints = new GridBagConstraints();
        constraints.anchor = GridBagConstraints.EAST;
        constraints.insets = new Insets(5, 5, 10, 0);
        layout.setConstraints(matchesLabel1, constraints);
        searchPanel.add(matchesLabel1);
        matchesLabel2 = new JLabel();
        matchesLabel2.setFont(
          matchesLabel2.getFont().deriveFont(Font.PLAIN));
        constraints = new GridBagConstraints();
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.insets = new Insets(5, 5, 10, 5);
        layout.setConstraints(matchesLabel2, constraints);
        searchPanel.add(matchesLabel2);
        // Set up matches table.
        table =
          new JTable(new DefaultTableModel(new Object[][]{},
            new String[]{"URL"}) {
          public boolean isCellEditable(int row, int column)
            return false;
        // Set up Matches panel.
        JPanel matchesPanel = new JPanel();
        matchesPanel.setBorder(
          BorderFactory.createTitledBorder("Matches"));
        matchesPanel.setLayout(new BorderLayout());
        matchesPanel.add(new JScrollPane(table),
          BorderLayout.CENTER);
        // Add panels to display.
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(searchPanel, BorderLayout.NORTH);
        getContentPane().add(matchesPanel,BorderLayout.CENTER);
      // Exit this program.
      private void actionExit() {
        System.exit(0);
      // Handle Search/Stop button being clicked.
      private void actionSearch() {
        // If stop button clicked, turn crawling flag off.
        if (crawling) {
          crawling = false;
          return;
      ArrayList errorList = new ArrayList();
      // Validate that start URL has been entered.
      String startUrl = startTextField.getText().trim();
      if (startUrl.length() < 1) {
        errorList.add("Missing Start URL.");
      // Verify start URL.
      else if (verifyUrl(startUrl) == null) {
        errorList.add("Invalid Start URL.");
      // Validate that Max URLs is either empty or is a number.
      int maxUrls = 0;
      String max = ((String) maxComboBox.getSelectedItem()).trim();
      if (max.length() > 0) {
        try {
          maxUrls = Integer.parseInt(max);
        } catch (NumberFormatException e) {
        if (maxUrls < 1) {
          errorList.add("Invalid Max URLs value.");
      // Validate that matches log file has been entered.
      String logFile = logTextField.getText().trim();
      if (logFile.length() < 1) {
        errorList.add("Missing Matches Log File.");
      // Validate that search string has been entered.
      String searchString = searchTextField.getText().trim();
      if (searchString.length() < 1) {
        errorList.add("Missing Search String.");
      // Show errors, if any, and return.
      if (errorList.size() > 0) {
        StringBuffer message = new StringBuffer();
        // Concatenate errors into single message.
        for (int i = 0; i < errorList.size(); i++) {
          message.append(errorList.get(i));
          if (i + 1 < errorList.size()) {
            message.append("\n");
        showError(message.toString());
        return;
      // Remove "www" from start URL if present.
      startUrl = removeWwwFromUrl(startUrl);
      // Start the Search Crawler.
      search(logFile, startUrl, maxUrls, searchString);
    private void search(final String logFile, final String startUrl,
      final int maxUrls, final String searchString)
      // Start the search in a new thread.
      Thread thread = new Thread(new Runnable() {
        public void run() {
          // Show hour glass cursor while crawling is under way.
          setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
          // Disable search controls.
          startTextField.setEnabled(false);
          maxComboBox.setEnabled(false);
          limitCheckBox.setEnabled(false);
          logTextField.setEnabled(false);
          searchTextField.setEnabled(false);
          caseCheckBox.setEnabled(false);
          // Switch Search button to "Stop."
          searchButton.setText("Stop");
          // Reset stats.
          table.setModel(new DefaultTableModel(new Object[][]{},
            new String[]{"URL"}) {
            public boolean isCellEditable(int row, int column)
              return false;
           updateStats(startUrl, 0, 0, maxUrls);
          // Open matches log file.
          try {
            logFileWriter = new PrintWriter(new FileWriter(logFile));
          } catch (Exception e) {
            showError("Unable to open matches log file.");
            return;
          // Turn crawling flag on.
          crawling = true;
          // Perform the actual crawling.
          crawl(startUrl, maxUrls, limitCheckBox.isSelected(),
            searchString, caseCheckBox.isSelected());
          // Turn crawling flag off.
          crawling = false;
          // Close matches log file.
          try {
            logFileWriter.close();
          } catch (Exception e) {
            showError("Unable to close matches log file.");
          // Mark search as done.
          crawlingLabel2.setText("Done");
          // Enable search controls.
          startTextField.setEnabled(true);
          maxComboBox.setEnabled(true);
          limitCheckBox.setEnabled(true);
          logTextField.setEnabled(true);
          searchTextField.setEnabled(true);
          caseCheckBox.setEnabled(true);
          // Switch search button back to "Search."
          searchButton.setText("Search");
          // Return to default cursor.
          setCursor(Cursor.getDefaultCursor());
          // Show message if search string not found.
          if (table.getRowCount() == 0) {
            JOptionPane.showMessageDialog(SearchCrawler.this,
              "Your Search String was not found. Please try another.",
              "Search String Not Found",
              JOptionPane.WARNING_MESSAGE);
      thread.start();
    // Show dialog box with error message.
    private void showError(String message) {
      JOptionPane.showMessageDialog(this, message, "Error",
        JOptionPane.ERROR_MESSAGE);
    // Update crawling stats.
    private void updateStats(
      String crawling, int crawled, int toCrawl, int maxUrls)
      crawlingLabel2.setText(crawling);
      crawledLabel2.setText("" + crawled);
      toCrawlLabel2.setText("" + toCrawl);
      // Update progress bar.
      if (maxUrls == -1) {
        progressBar.setMaximum(crawled + toCrawl);
      } else {
        progressBar.setMaximum(maxUrls);
      progressBar.setValue(crawled);
      matchesLabel2.setText("" + table.getRowCount());
    // Add match to matches table and log file.
    private void addMatch(String url) {
      // Add URL to matches table.
      DefaultTableModel model =
        (DefaultTableModel) table.getModel();
      model.addRow(new Object[]{url});
      // Add URL to matches log file.
      try {
        logFileWriter.println(url);
      } catch (Exception e) {
        showError("Unable to log match.");
    // Verify URL format.
    private URL verifyUrl(String url) {
      // Only allow HTTP URLs.
      if (!url.toLowerCase().startsWith("http://"))
        return null;
      // Verify format of URL.
      URL verifiedUrl = null;
      try {
        verifiedUrl = new URL(url);
      } catch (Exception e) {
        return null;
      return verifiedUrl;
    // Check if robot is allowed to access the given URL. private boolean isRobotAllowed(URL urlToCheck) {
      String host = urlToCheck.getHost().toLowerCase();
      // Retrieve host's disallow list from cache.
      ArrayList disallowList =
        (ArrayList) disallowListCache.get(host);
      // If list is not in the cache, download and cache it.
      if (disallowList == null) {
        disallowList = new ArrayList();
        try {
          URL robotsFileUrl =
            new URL("http://" + host + "/robots.txt");
          // Open connection to robot file URL for reading.
          BufferedReader reader =
            new BufferedReader(new InputStreamReader(
              robotsFileUrl.openStream()));
          // Read robot file, creating list of disallowed paths.
          String line;
          while ((line = reader.readLine()) != null) {
            if (line.indexOf("Disallow:") == 0) {
              String disallowPath =
                line.substring("Disallow:".length());
              // Check disallow path for comments and remove if present.
              int commentIndex = disallowPath.indexOf("#");
              if (commentIndex != -1) {
                disallowPath =
                  disallowPath.substring(0, commentIndex);
              // Remove leading or trailing spaces from disallow path.
              disallowPath = disallowPath.trim();
              // Add disallow path to list.
              disallowList.add(disallowPath);
          // Add new disallow list to cache.
          disallowListCache.put(host, disallowList);
        catch (Exception e) {
          /* Assume robot is allowed since an exception
             is thrown if the robot file doesn't exist. */
          return true;
      /* Loop through disallow list to see if
         crawling is allowed for the given URL. */
      String file = urlToCheck.getFile();
      for (int i = 0; i < disallowList.size(); i++) {
        String disallow = (String) disallowList.get(i);
        if (file.startsWith(disallow)) {
          return false;
      return true;
    // Download page at given URL.
    private String downloadPage(URL pageUrl) {
      try {
        // Open connection to URL for reading.
        BufferedReader reader =
          new BufferedReader(new InputStreamReader(
            pageUrl.openStream()));
        // Read page into buffer.
        String line;
        StringBuffer pageBuffer = new StringBuffer();
        while ((line = reader.readLine()) != null) {
          pageBuffer.append(line);
        return pageBuffer.toString();
      } catch (Exception e) {
      return null;
    // Remove leading "www" from a URL's host if present.
    private String removeWwwFromUrl(String url) {
      int index = url.indexOf("://www.");
      if (index != -1) {
        return url.substring(0, index + 3) +
          url.substring(index + 7);
      return (url);
    // Parse through page contents and retrieve links.
    private ArrayList retrieveLinks(
      URL pageUrl, String pageContents, HashSet crawledList,
      boolean limitHost)
      // Compile link matching pattern.
      Pattern p =
        Pattern.compile("<a\\s+href\\s*=\\s*\"?(.*?)[\"|>]",
          Pattern.CASE_INSENSITIVE);
      Matcher m = p.matcher(pageContents);
      // Create list of link matches.
      ArrayList linkList = new ArrayList();
      while (m.find()) {
        String link = m.group(1).trim();
        // Skip empty links.
        if (link.length() < 1) {
          continue;
        // Skip links that are just page anchors.
        if (link.charAt(0) == '#') {
          continue;
        // Skip mailto links.
        if (link.indexOf("mailto:") != -1) {
          continue;
        // Skip JavaScript links.
        if (link.toLowerCase().indexOf("javascript") != -1) {
          continue;
        // Prefix absolute and relative URLs if necessary.
        if (link.indexOf("://") == -1) {
          // Handle absolute URLs.
          if (link.charAt(0) == '/') {
            link = "http://" + pageUrl.getHost() + link;
          // Handle relative URLs.
          } else {
            String file = pageUrl.getFile();
            if (file.indexOf('/') == -1) {
              link = "http://" + pageUrl.getHost() + "/" + link;
            } else {
              String path =
                file.substring(0, file.lastIndexOf('/') + 1);
              link = "http://" + pageUrl.getHost() + path + link;
        // Remove anchors from link.
        int index = link.indexOf('#');
        if (index != -1) {
          link = link.substring(0, index);
        // Remove leading "www" from URL's host if present.
        link = removeWwwFromUrl(link);
        // Verify link and skip if invalid.
        URL verifiedLink = verifyUrl(link);
        if (verifiedLink == null) {
          continue;
        /* If specified, limit links to those
          having the same host as the start URL. */
        if (limitHost &&
            !pageUrl.getHost().toLowerCase().equals(
              verifiedLink.getHost().toLowerCase())) 
          continue;
        // Skip link if it has already been crawled.
        if (crawledList.contains(link)) {
          continue;
        // Add link to list.
        linkList.add(link);
      return (linkList);
    /* Determine whether or not search string is
       matched in the given page contents. */
    private boolean searchStringMatches(
      String pageContents, String searchString,
      boolean caseSensitive)
      String searchContents = pageContents;
      /* If case-sensitive search, lowercase
         page contents for comparison. */
      if (!caseSensitive) {
        searchContents = pageContents.toLowerCase();
      // Split search string into individual terms.
      Pattern p = Pattern.compile("[\\s]+");
      String[] terms = p.split(searchString);
      // Check to see if each term matches.
      for (int i = 0; i < terms.length; i++) {
        if (caseSensitive) {
          if (searchContents.indexOf(terms) == -1) {
    return false;
    } else {
    if (searchContents.indexOf(terms[i].toLowerCase()) == -1) {
    return false;
    return true;
    // Perform the actual crawling, searching for the search string.
    public void crawl(
    String startUrl, int maxUrls, boolean limitHost,
    String searchString, boolean caseSensitive)
    // Set up crawl lists.
    HashSet crawledList = new HashSet();
    LinkedHashSet toCrawlList = new LinkedHashSet();
    // Add start URL to the to crawl list.
    toCrawlList.add(startUrl);
    /* Perform actual crawling by looping
    through the To Crawl list. */
    while (crawling && toCrawlList.size() > 0)
    /* Check to see if the max URL count has
    been reached, if it was specified.*/
    if (maxUrls != -1) {
    if (crawledList.size() == maxUrls) {
    break;
    // Get URL at bottom of the list.
    String url = (String) toCrawlList.iterator().next();
    // Remove URL from the To Crawl list.
    toCrawlList.remove(url);
    // Convert string url to URL object.
    URL verifiedUrl = verifyUrl(url);
    // Skip URL if robots are not allowed to access it.
    if (!isRobotAllowed(verifiedUrl)) {
    continue;
    // Update crawling stats.
    updateStats(url, crawledList.size(), toCrawlList.size(),
    maxUrls);
    // Add page to the crawled list.
    crawledList.add(url);
    // Download the page at the given URL.
    String pageContents = downloadPage(verifiedUrl);
    /* If the page was downloaded successfully, retrieve all its
    links and then see if it contains the search string. */
    if (pageContents != null && pageContents.length() > 0)
    // Retrieve list of valid links from page.
    ArrayList links =
    retrieveLinks(verifiedUrl, pageContents, crawledList,
    limitHost);
    // Add links to the To Crawl list.
    toCrawlList.addAll(links);
    /* Check if search string is present in
    page, and if so, record a match. */
    if (searchStringMatches(pageContents, searchString,
    caseSensitive))
    addMatch(url);
    // Update crawling stats.
    updateStats(url, crawledList.size(), toCrawlList.size(),
    maxUrls);
    // Run the Search Crawler.
    public static void main(String[] args) {
    SearchCrawler crawler = new SearchCrawler();
    crawler.show();
    }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Start up programs icloud doesn't play by the rules

    I intend this to be a formal complaint. I am running windows 7 64-bit on my PC, and have repeatedly removed the iCloud program from the list of assigned startup programs. Every few restarts (so every 1-2 times that I restart or turn on my computer) it appears again, running at startup, using up resources. I value the control I have over which programs open when I start my computer- by managing the programs and limiting the number which automatically run to only those which I find essential (like sound driver software, video display driver software, wireless management software, and antivirus) I am able to dramatically reduce the time it takes for my computer to be ready for use after pushing the on/off button.
    iCloud, as a singular exception within this system, does not play by the rules. I suspect that it is constantly checking for updates and upon updating or simply upon auto-running to perform this check, it resets or resestablishes information in the computer's registry, bypassing my GUI established setting and re-assigning itself as a startup program. For this reason I am now uninstalling iCloud from my computer.
    I do not know if this was an intentional tactic by Apple to make their brand even more ubiquitous than it already is, or simply an oversight/something ignored as unimportant by the developers. Either way, I find it manipulative or at the very least, a poor business practice. Thanks for reading.

    Thank you for this information. I am going to get rid of my  i Phone5c because of this policy of Apple!  Maybe they need sued to stop this policy!

Maybe you are looking for

  • Weird ABS problem - it's changing the size of a file

    I'm putting together this PKGBUILD: # Contributor: Tom K <[email protected]> pkgname=mach64-dri pkgver=20060205 pkgrel=1 pkgdesc="Kernel and xorg modules for mach64 DRI" depends=('x-server') source=(http://dri.freedesktop.org/snapshots/mach64-$pkgver

  • ABAP PROGRAM " Streaming DATA " is not working in SAP ITS 6.20

    dear all, i try create application on abap ( WAS 6.20 ) the concept application is real time streaming data . on SAP Gui the application is working properly, the second scenario i try publish this application to SAP ITS 6.20,when we running the progr

  • Application and system prefs errors after restoring user

    When I try to open a few of my applications, I'm getting this error message: "[application] cannot be opened because of a problem."  And something about check with the developer for compatibility with this version of OSX.  This is happening with all

  • Update to ML kills Large IMAP Account Performance

    I'm using Mail.app in Mountain for two Gmail IMAP accounts (one personal, one work). I have both accounts set up to download and keep a local copy of everything. On my old 2009 MBP with SSD this setup gave me lightning fast local searches of my entir

  • Is there a mail setting that will stop opening the emails automatically?

    Just upgraded to Mt. Lion, and find that in Mail, if I just click on the notification, it opens the mail in a small side panel. Can I avoid this in settings somewhere?  There are emails I don't want to open, just delete. Can anyone help? Thanks.