This content has been marked as final. Show 7 replies
Hey Aacc,1 person found this helpful
a piece of information for you, when you specify in the resultset Filters section, the UCM expects java class AlterPrefix.CustomFilter in side the classes folder. your folder hierarchy should be like
If you can provide more information on your directory structure of the custom component with subfolders in side the classes directory, may be I can help you more.
Hi!1 person found this helpful
First, make sure the classes are in the classpath. Look under the menu option "Configuration for xxx" to find the current classpath.
There is a small problem with using the Component Wizard for updating the class path. Just setting the class path in the build settings dialog doesn't do it. The classpath seems to be updated with the component class path only during the enabling of a component. So a simple "disable, restart, enable, restart" might be needed.
Try to remove the folder AlterPrefix from server/custom to server/classes1 person found this helpful
Hi Aacc,1 person found this helpful
I had the same problem recently with a component. This is probably the same thing as Sam is saying, but using Component Wizard I had to go to Advanced and put $COMPONENT_DIR/classes into the custom class path. Then I was able to have the classes reside under the <install>/custom directory. Then disable, rebuild, and re-enable your component ... and restart server :)
Hope you've got this solved.
Edited by: jschulz on Mar 12, 2010 7:51 AM
Edited by: jschulz on Mar 12, 2010 7:52 AM
@jschultz is correct...
In your component build settings, you need to click advanced, and then add the component classpath. In your component definition file (MyComponent.hda) you should see a line like this:
Then you need to disable, and re-enable your component. If you do this, then you should see you component's classpath in the "ucm/config/state.cfg" file. Then you know it's in the classpath when UCM launches.
NOW... if you STILL have problems about not being able to instantiate the Java class, the most common problem is a misspelling of the Java class. Double check everything, preferably with a fresh set of eyes.
Another problem is that despite claims to the contrary, if you compile your Java classes with one JVM version, and instantiate them through reflection with another JVM version, then you'll occasionally get bizarre class not found" exceptions. Be sure to compile your code with the EXACT same version of Java that is running UCM.
Thanks a lot...i was facing the same issue and the issue gets resolved by following your steps,seems by default the CS will not look for custom component's classes by its own, we have to specify in our component file... :-)
Being new to Oracle UCM, I apologize for any absurd questions I post.
I have created a test component with a java class which prints "Hello World". Have done these following configuration settings -
1. Specified component classpath in build advance settings. MyComponent.hda file shows the classpath as classpath=$COMPONENT_DIR/classes
2. Component's classpath in the "ucm/config/state.cfg" file shows as - test_classpath=$IntradocDir/custom/test/classes. This seems to be okay I believe.
3. Java class compiled with the same version of Java that is running UCM. JRE 1.5 update 11
4. Service is executed with the java method - test()
Still I get this exception -
System code execution error. Runtime error: java.lang.ClassCastException: test.TestClass
at intradoc.server.IdcServerThread.run(IdcServerThread.java:197) at intradoc.server.ServiceManager.createServiceEx(ServiceManager.java:469)
at intradoc.server.IdcServerThread.run(IdcServerThread.java:197) ---!>