[jira] Created: (VELOCITY-794) can't get the velocity template in networks

2011-01-06 Thread fanglei (JIRA)
can't get the velocity template in networks 


 Key: VELOCITY-794
 URL: https://issues.apache.org/jira/browse/VELOCITY-794
 Project: Velocity
  Issue Type: Bug
  Components: Engine
Affects Versions: 1.7
 Environment: windows xp
eclipse 3.5
Reporter: fanglei


   begin:
properties.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, 
"FileParentPath");   
velocityEngine = new VelocityEngine(properties);
 when I get VM Template in this way:
  template = velocityEngine.getTemplate("C:\xxx\ABC.vm" 
"GBK");
 I can get the template object.
but when I get VM Template which the path on LAN like this:
   template = 
velocityEngine.getTemplate("\\CompanyName\myPC\xxx\ABC.vm" "GBK");
I can't get the template object and catch an error message:

2011-1-7 11:47:00 org.apache.velocity.runtime.log.JdkLogChute log
严重: ResourceManager : unable to find resource 
'TB_%modelNameInFileName%.java.vm' in any resource loader.
org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
resource 'TB_%modelNameInFileName%.java.vm'
at 
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483)
at 
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
at 
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
at 
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:422)
at mda.codemachine.core.engine.Builder.build(Builder.java:50)


I want create VM LAN Pool for public,so I must do this.
thank you~



   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Created: (VELOCITY-793) Change ResourceLoader.getResourceStream to getResourceReader

2011-01-06 Thread Christopher Schultz (JIRA)
Change ResourceLoader.getResourceStream to getResourceReader


 Key: VELOCITY-793
 URL: https://issues.apache.org/jira/browse/VELOCITY-793
 Project: Velocity
  Issue Type: Wish
  Components: Engine
Reporter: Christopher Schultz
 Fix For: 2.x


It would be nice to use Readers instead of InputStreams for templates.

Velocity is all about text-based rendering, so the templates are certainly 
going to be text-based. Using a Reader allows individual readers to determine 
the character encoding if necessary (say, from a database) and not have another 
component second-guess them.

Of course, this is a serious change to the API. We could possible re-implement 
getResourceStream to read a Reader and provide bytes as backward-compatibility 
with older client code, but since we're going to 2.0, this would be the time to 
make breaking changes to the API.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-599) DataSourceResourceLoader doesn't support UTF8

2011-01-06 Thread Christopher Schultz (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978540#action_12978540
 ] 

Christopher Schultz commented on VELOCITY-599:
--

Mark's hack could waste huge amounts of memory due to the complete fetching of 
the clob, then converting it to a byte array, then reading from that.

I'm not sure why using getBinaryStream doesn't work. Can someone explain? Using 
getClob sounds like it's just going to make us convert from char to binary and 
then back again at a higher level.

I'll make another push to change template fetching to use Readers. Maybe in 2.0?

> DataSourceResourceLoader doesn't support UTF8
> -
>
> Key: VELOCITY-599
> URL: https://issues.apache.org/jira/browse/VELOCITY-599
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 1.5
> Environment: WindowsServer2003 R2, 
> Oracle10g(10.2.0,UTF8characterSet),  jdk1.5.0_12
>Reporter: markchen
> Fix For: 2.x
>
>
> If templates are stored in the database instead of files,the characters 
> retrived becomes garbled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-782) UNC Path support for Velocity

2011-01-06 Thread Christopher Schultz (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978533#action_12978533
 ] 

Christopher Schultz commented on VELOCITY-782:
--

Shouldn't there be some back-slashes in your UNC path name? I don't see any of 
them.

> UNC Path support for Velocity
> -
>
> Key: VELOCITY-782
> URL: https://issues.apache.org/jira/browse/VELOCITY-782
> Project: Velocity
>  Issue Type: Bug
> Environment: Jameica 1.10 + Hibiscus 1.12
> Windows 7 Ultimate x64
> WHS
>Reporter: Frank Glaser
>Priority: Minor
> Attachments: patch1-0
>
>
> Add UNC Path support for the getTemplate function:
> Here an extract of the Hibiscus log file:
> ...
> [Mon Oct 18 18:23:16 CEST 
> 2010][INFO][de.willuhn.jameica.gui.internal.parts.BackgroundTaskMonitor.check]
>  creating progress monitor for GUI
> [Mon Oct 18 18:23:16 CEST 
> 2010][INFO][de.willuhn.jameica.gui.internal.parts.BackgroundTaskMonitor$2.run]
>  activating progress monitor
> [Mon Oct 18 18:23:16 CEST 2010][INFO][de.willuhn.boot.BootLoader.resolve]   
> init service de.willuhn.jameica.services.VelocityService
> [Mon Oct 18 18:23:16 CEST 2010][INFO][de.willuhn.boot.BootLoader.resolve] 
> used time to init de.willuhn.jameica.services.VelocityService: 285 millis
> [Mon Oct 18 18:23:16 CEST 
> 2010][ERROR][de.willuhn.jameica.services.VelocityService$VelocityLogger.log] 
> ResourceManager : unable to find resource 
> 'de.willuhn.jameica.hbci.rmi.Umsatz.csv.vm' in any resource loader.
> [Mon Oct 18 18:23:16 CEST 
> 2010][ERROR][de.willuhn.jameica.hbci.io.VelocityExporter.doExport] error 
> while writing into export file
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
> resource 'de.willuhn.jameica.hbci.rmi.Umsatz.csv.vm'
>   at 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:452)
>   at 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:335)
>   at 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1102)
>   at 
> org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:549)
>   at 
> de.willuhn.jameica.hbci.io.VelocityExporter.doExport(VelocityExporter.java:107)
>   at 
> de.willuhn.jameica.hbci.gui.dialogs.ExportDialog$3.run(ExportDialog.java:193)
>   at de.willuhn.jameica.gui.GUI$6.run(GUI.java:912)
> [Mon Oct 18 18:23:16 CEST 
> 2010][ERROR][de.willuhn.jameica.messaging.LogMessageConsumer.handleMessage] 
> Fehler beim Schreiben in die Export-Datei
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org